Skip to content
/ maxProd Public

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

License

Notifications You must be signed in to change notification settings

khanrn/maxProd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 git@github.com: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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published