solution for binary tree level traverseII