Simple way to zigzag traverse matrix
Try to build a tree for testing