Jadi on Nostr: having an array of a stock's price in every single day, how can we maximize our ...
having an array of a stock's price in every single day, how can we maximize our profit with just one buy and one sell? This is a famous interview question in many companies.
Here I'll show you a BAD solution first so we can understand why its bad and have a practical intro to BIG O notation. Then we will cover a good solution to understand the difference between O(n^2) and O(n).
https://youtu.be/qtuOSS1pA3c
#programming #algorithm #interview
Here I'll show you a BAD solution first so we can understand why its bad and have a practical intro to BIG O notation. Then we will cover a good solution to understand the difference between O(n^2) and O(n).
https://youtu.be/qtuOSS1pA3c
#programming #algorithm #interview