Giter Site home page Giter Site logo

codemascot / maxprod Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.18 MB

leetCode 628: Given a list of numbers, find three numbers whose product is maximum and return the maximum product.

License: MIT License

Haskell 100.00%
cli haskell maybe-monad mergesort quickstart

maxprod's Introduction

maxProd

leetCode 628: Given a list of numbers, find three numbers whose product is maximum and return the maximum product.

Installation

NB. This project is deveoped with cabal and you need to install cabal to compile and use it.

  1. Clone the repo
$ git clone [email protected]:codemascot/maxProd.git <path/to/the/project>
  1. Change directory to the path with cd
$ cd <path/to/the/project>
  1. Compile the project using cabal
$ cabal build
  1. Run the project with the executable
$ ./dist-newstyle/build/x86_64-linux/ghc-8.10.7/maxProd-0.1.0.0/x/maxProd/build/maxProd/maxProd

Example

Running the executable will give output in the prompt like below-

❯ ./dist-newstyle/build/x86_64-linux/ghc-8.10.7/maxProd-0.1.0.0/x/maxProd/build/maxProd/maxProd
Input your list here as [1, 10, 2, 5, 6, 3] :

The result would be shown like below-

❯ ./dist-newstyle/build/x86_64-linux/ghc-8.10.7/maxProd-0.1.0.0/x/maxProd/build/maxProd/maxProd
Input your list here as [1, 10, 2, 5, 6, 3] :
[1, 10, 2, 5, 6, 3]
300

License

Copyright © 2023 Khan Mohammad R. AKA CodeMascot

maxprod's People

Contributors

codemascot avatar

Watchers

 avatar

maxprod's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.