add a new DP sol using O(n) space
add a more elegent greedy solution
add a more straight forward solution
add some comment and try to rewrite more clean code