Approach hintTry it first, then revealHide
Run an ordinary level-order BFS and reverse every other level before appending it, or fill each level's array from the opposite end on alternate levels.
Run an ordinary level-order BFS and reverse every other level before appending it, or fill each level's array from the opposite end on alternate levels.