Shopee interview question

question about binary tree (BFS)