Dont understand one case


  • 0
    H

    Why should [2,1,4,3,6,5,7,8] return [2,4,6,7,1,3,5,8]?
    I thought it should be odd numbers first and even numbers follow, like [1,3,5,7,2,4,6,8].
    Did I understand wrong or is the description wrong?


  • 0
    H

    Oh I see what happened here...
    It's not the values I should consider, it's the indexes.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.