Leetcode Next Greater Integer Function Grapher