CS Notes

Recent writing

  • VLAN

    Aug 29, 2025

    • networking
  • End-to-End Service Access Troubleshooting

    Aug 29, 2025

    • networking
  • File System Link

    Aug 29, 2025

    • OS
    • bash

See 642 more →

👋🏻 Join My Telegram channel!


I share real-world lessons from building scalable systems at Binance, and running mission-critical cloud ops at GovTech and Singapore Air Force. No fluff, just practical takeaways, hard-earned fixes, and deep dives that matter.

Home

❯

Data Structure

❯

Tree

❯

Perfect Binary Tree (完美二叉树)

Perfect Binary Tree (完美二叉树)

91 words, 1 min read
Last updated on Apr 14, 2024
🌟 Edit This Page!   🗓️ History

  • dsa
Xinyang YU

Abstract


  • A Tree only has nodes that have a Degree of 0 or 2 AND the nodes with degree 0 is on the last Level
  • Complete Binary Tree (完全二叉树) whose Depth of the left most branch is same as the depth of the right most branch

Calculate total number of nodes

total=2height+1−1. This operation takes logn time, because we need to go to the bottom of the tree from one side to find the Tree Height.

Question Bank

Properties

  • 222. Count Complete Tree Nodes

Mentioned by

  • Data Structure Content Page
  • Complete Binary Tree (完全二叉树)

Graph View


Created by Xinyang YU | © 2023, 2025 | Licensed under CC BY-NC 4.0

  • GitHub