Why not [0,2,4,6] given example


#1

Input: [3, 4, 7, 1, 2, 9, 8]
Output: [0, 2, 3, 5]
output can also contain [0,2,4,6]


#2

answer should be a lexicographical tuple if more than one tuple exists .
so [0,2,3,5];


#3

Yes, you are right!!
I misread the question to give all possible outputs, Thank you