958. Check Completeness of a Binary Tree - notruilin/LeetCode GitHub Wiki

Queue

import queue
q = queue.Queue()
q.put(root)
while not q.empty():
    node = q.get()
    ......