Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何验证二叉搜索树(表示为排序数组)是否已满?这需要在 O(n) 中完成。
如果树是平衡的,只需检查是否有 2^(n-1)+1 个元素