NP-Completeness The “First” NP-Complete problem Theorem. CIRCUIT-SAT is NP-complete. [Cook 1971, Levin 1973] Pf.(sketch) Any algorithm that takes a fixed number of bits n as input and produces
https://leetcode.com/problems/check-completeness-of-a-binary-tree/ 层次遍历,依次将每层的所有节点压入队列,空节点也照常压入, 每次从队列中取出一个节点,若该节点为空,则队列应该为空,或者剩余节点全部为空节点。 /*** Definition for a binary tree node.* struct Tr