Rising Temperature Leetcode Solution