Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
it means the next element higher compared to the element you're currently on.
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.