Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ dp Public

Dynamic Programming problems and solutions

Notifications You must be signed in to change notification settings

ctsrc/dp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dynamic programming problems and solutions

Dynamic programming [...] refers to simplifying a complicated problem by breaking it down into simpler sub-problems in a recursive manner.

https://en.wikipedia.org/wiki/Dynamic_programming

Table of Contents

Highlighted problems and solutions

Your algorithms have become so good at predicting the market that you now know what the share price of Wooden Orange Toothpicks Inc. (WOT) will be for the next number of days.

Each day, you can either buy one share of WOT, sell any number of shares of WOT that you own, or not make any transaction at all. What is the maximum profit you can obtain with an optimum trading strategy?

READ MORE

cargo test --release --doc -p stockmax
running 3 tests
test src/lib.rs - stockmax (line 7) ... ok
test src/lib.rs - stockmax (line 3) ... ok
test src/lib.rs - stockmax (line 11) ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
cargo run --release stockmax < stockmax/test/input/input11.txt
6
4

Mo' money πŸ€‘ πŸ€‘ πŸ€‘ mo' problems 😩 😩 😩

This section lists problems and solutions that were not interesting enough to deserve highlighting.

Currently there are no problems and solutions in this section. Mainly because only one problem has been solved so far. And partly because not interesting problems are also not so interesting to solve so I might decide not to solve them in the first place.

About

Dynamic Programming problems and solutions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published