Bloomberg interview question

Next Greater Element II on LeetCode