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.
- Zig Zag Sequence
- Discussions
Zig Zag Sequence
Zig Zag Sequence
Sort by
recency
|
151 Discussions
|
Please Login in order to post a comment
The findZigZagSequence function is not provided.
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]
If you change more than 3 lines of code it will fail, even if response is correct!
Less than ideal.
The C++ solution doesn't pass correctly even with the correct code and the correct output. I changed to the Python version, which did work (with the same code changes to get the correct output, identical to the C++ version. . Don't spend too much time on this issue, as I did. Don't spen
I wrote my code in python 3 .I think my answer is correct . I checked and found that even after using the return statement I cannot see any output when I run code