Integer Replacement 2 Leetcode