## [Leetcode]714. Best Time to Buy and Sell Stock with Transaction Fee

This series of Buy and Sell Stock I~VI on Leetcode is a great practice for Dynamic Programming – State Machine. Therefore I prepared blogs for each of them and hopefully it would help you to understand them better. You can find the relations of them at the bottom and feel free to leave any comments.

Continue reading “[Leetcode]714. Best Time to Buy and Sell Stock with Transaction Fee”

## [Leetcode]309. Best Time to Buy and Sell Stock with Cooldown

This series of Buy and Sell Stock I~VI on Leetcode is a great practice for Dynamic Programming – State Machine. Therefore I prepared blogs for each of them and hopefully it would help you to understand them better. You can find the relations of them at the bottom and feel free to leave any comments.

Continue reading “[Leetcode]309. Best Time to Buy and Sell Stock with Cooldown”

## [Leetcode]1553. Minimum Number of Days to Eat N Oranges

There are n oranges in the kitchen and you decided to eat some of these oranges every day as follows:
Eat one orange.
If the number of remaining oranges (n) is divisible by 2 then you can eat  n/2 oranges.
If the number of remaining oranges (n) is divisible by 3 then you can eat  2*(n/3) oranges.
You can only choose one of the actions per day.
Return the minimum number of days to eat n oranges.
Constraints:
1 <= n <= 2*10^9
Continue reading “[Leetcode]1553. Minimum Number of Days to Eat N Oranges”