Zig Zag Sequence

  • + 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