Operations for trees stored in BFS layout