Given a circular array, for each element find the next greater element. If none, return -1.
Input: nums=[1,2,1] Output: [2,-1,2] Input: nums=[1,2,3,4,3] Output: [2,3,4,-1,4]
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features