leetcode, max profit