AlgoMaster Logo

Next Greater Element II

nums=[1, 2, 1]
0 / 11
algomaster.io
Step:Brute force: for each element, scan the array circularly for the next greater.