leetle

Daily challenge for 2025-09-01

244. Next Greater Element (Circular)

Given a circular array nums, the next greater element for each element is the first greater element to its right wrapping around to the start if needed. If it doesn't exist, put -1. Return the resulting array.

Example:
Input: nums = [1,2,1]
Output: [2,-1,2]

Run this challenge interactively in Python or JavaScript when the app loads.