I am trying to write a function wherein if I give an \'array of integers\' it changes itself into a zig-zag pattern.
the pattern is such that [L,H,L,H..] OR [H,L,H,L.