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
|
747 Discussions
|
Please Login in order to post a comment
C# is broken. Not only is the program empty (so I had to build it from scratch, including reverse-engineering the I/O) but also producing the expected output does not satisfy the tests. Fix this please!
I have 10 YOE and I can not understand this question, or atleast the way it is asked.
[UPDATE] Seems like the code body is NOT provided for most languages, I see only C++ has it and for others like GO, C# it's not. Terrible!
FIXXXX THE JS PART!!
I wrote the ligic for this problem, but it's getting an error. My logic is absolutely currect and my output and expected are matching perfectly. I tested with custom input as well getting exact output but while running code still getting the same error.
func findZigZagSequence(arr []int, n int) []int { sort.Ints(arr)
}
Looks like for this problem for javascript the function where we have to add the answer is receiving the input as mentioned in the input statement. we have to parse it as below
input = input.split('\n')[2].split(' ')
After that I am getting the expected output as needed but always fails for below code, which looks fine