CDW interview question

Code to calculate next greater element in circular array