0 Indexed or 1 Indexed


#1

Using the “See expected output” feature, it is giving the same answer on the two test cases shown:

  1. 5 1 2 3 4 5 1 5
  2. 5 1 2 3 4 5 0 4

In both of these it is reversing the whole list, so are the numbers ‘m’ and ‘n’, 0 indexed or 1 indexed??


#2

I got the right answer when I considered them 1 indexed


#3

these follow 1 Indexing as ques clearly mention 1<=m<=n<=Length of List.