DemandTec interview question

implement a 2 D zig-zag array