Add a Divide and Conquer version of the MaxSubArray problem.

This commit is contained in:
Oleksii Trekhleb
2022-02-04 08:56:15 +01:00
parent 819f38f792
commit 82f0b5edf0
8 changed files with 67 additions and 8 deletions

View File

@@ -207,6 +207,7 @@ algorithm is an abstraction higher than a computer program.
* `B` [Best Time To Buy Sell Stocks](src/algorithms/uncategorized/best-time-to-buy-sell-stocks) - divide and conquer and one-pass examples
* `A` [Permutations](src/algorithms/sets/permutations) (with and without repetitions)
* `A` [Combinations](src/algorithms/sets/combinations) (with and without repetitions)
* `A` [Maximum Subarray](src/algorithms/sets/maximum-subarray)
* **Dynamic Programming** - build up a solution using previously found sub-solutions
* `B` [Fibonacci Number](src/algorithms/math/fibonacci)
* `B` [Jump Game](src/algorithms/uncategorized/jump-game)
@@ -278,6 +279,8 @@ rm -rf ./node_modules
npm i
```
Also make sure that you're using a correct Node version (`>=14.16.0`). If you're using [nvm](https://github.com/nvm-sh/nvm) for Node version management you may run `nvm use` from the root folder of the project and the correct version will be picked up.
**Playground**
You may play with data-structures and algorithms in `./src/playground/playground.js` file and write