trivial solution to searchInsert
non-stl solution to searchInsert
DP solution to maxProfit (2)
constant memory solution to maxProfit (2)