We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The example provided in description seems misleading,
for[2,3,1,5,4]the correct output is [1,2,5,4,3] , however in description we have [1,4,5,3,2] (altough it is mentioned it is a zigzag sequence).
It would be better the descrption updated to say: the correct expected sequence in this case is [1,2,5,4,3]
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Zig Zag Sequence
You are viewing a single comment's thread. Return to all comments →
The example provided in description seems misleading, for
[2,3,1,5,4]
the correct output is[1,2,5,4,3]
, however in description we have[1,4,5,3,2]
(altough it is mentioned it is a zigzag sequence).It would be better the descrption updated to say: the correct expected sequence in this case is
[1,2,5,4,3]