Next greater value around a circle
The values in nums sit around a circle: after the last one you come back to the first. For each value, walk forward around the circle and return the first value you meet that is strictly greater, or None (shown as null) if there is none, as for the largest value. The result has one entry per value, in the same order.
Values may repeat and may be negative; nums may be empty. Aim for O(n): walking forward from every value is O(n²).
Besides the tests, one large input (4,500 values) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
next_greater_circular([1,2,1])→[2,null,2]next_greater_circular([3,8,4,1,2])→[8,null,8,2,3]next_greater_circular([5,4,3,2,1])→[null,5,5,5,5]