Zig Zag Sequence

Sort by

recency

|

928 Discussions

|

  • + 0 comments

    PHP feels broken on this exercise. No boilerplate function given so I must read stdin and then I get a failure on this result:

    Input (stdin)

    1
    
    7
    
    1 2 3 4 5 6 7
    

    Your Output (stdout)

    1 2 3 7 6 5 4
    

    Expected Output

    1 2 3 7 6 5 4
    
  • + 0 comments

    Task said: "In this challenge, the task is to debug the existing code to successfully execute all provided test files." and "You can modify at most three lines in the given code. You cannot add or remove lines of code." But code is not given and you have to write quite long code. Am I wrong?

  • + 1 comment

    the example in the description is intentionally vague and wrong, the lexicographically smallest arrangement is 1,2,5,4,3 not 1,4,5,3,2

    problem is much easier to solve understanding this because the constraint limits how complex you can be on implementation

  • + 1 comment

    Not sure what is wrong for c++14: 1 2 3 7 6 5 4 -> my out 1 2 3 7 6 5 4 -> expected But still I get wrong answer, are tests mesd up?

  • + 0 comments

    Complete mess for C# version. Test completely invalid