educative.io

Educative

Start from sink, more order are valid

I started the sorting from sink first and they are more valid order than provided on the example

like 5 3 6 2 4 0 1

is also a valid sort.