Ad
  • Default User Avatar

    I'm having trouble figuring out what "least greater element to its right" means. It seems to imply the smallest number to the right of the current/any number however looking at the example given, the smallest number to the right of the first number(8) would be 3 and not 18 as in the desired output.