Shopee Interview Question

question about binary tree (BFS)