Leetcode Next Greater Integer Functions