Leetcode Next Greater Integer Function Examples R