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
|
58 Discussions
|
Please Login in order to post a comment
My output is correct, still it is showing wrong answer. I am not able to understand the issue here, is it error from my end in terms of space/character/integer or error from hackerrank side.
def findZigZagSequence(a, n):
On java is needed to use JAVA 7,
I made it in php, c++11, python and everywhere it gives same answer as output with wrong answer result Support is ignoring the case - hackerrank please fix that one it drives me crazy
If you're in python, the instructions are misleading. You can't modify any three lines of code, but have to modify the ones they expect you to. After i made the following three changes, it worked for me as of May 10 2024:
mid = int((n + 1)/2) --> mid = int((n - 1)/2)
ed = n - 1 --> ed = n - 2
ed = ed + 1 --> ed = ed - 1