update reverse in zigzag traversal