helper function that converts given array in zig-zag form*/
source not stored for this graph (policy: none)
no test coverage detected