level traversal bottom up