1. Home
  2. Explore
  3. Computer Science
  4. Binary Tree Fundamentals

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Binary Tree Fundamentals

  • 14Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Tree Types
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is a full binary tree?

Tap to flipClick to flipspace

A tree where every node has either 0 or 2 children. No node has exactly one child.

Or swipe the card

14 cards

  1. What is a full binary tree?

    A tree where every node has either 0 or 2 children. No node has exactly one child.

  2. What is a complete binary tree?

    A tree that is filled top-to-bottom and left-to-right, with no missing nodes in the middle of the filling order.

  3. What is a perfect binary tree?

    A tree where all leaves are on the same level and every node with children has exactly two children. It is both complete and full.

  4. What does the prefix 'pre-' in pre-order traversal indicate?

    The node is visited before its left and right subtrees.

  5. What does the prefix 'in-' in in-order traversal indicate?

    The node is visited between the left and right subtrees.

  6. What does the prefix 'post-' in post-order traversal indicate?

    The node is visited after both left and right subtrees.

  7. What is the order of operations in a pre-order traversal?

    1. Visit the node. 2. Recursively traverse left subtree. 3. Recursively traverse right subtree.
  8. What is the order of operations in an in-order traversal?

    1. Recursively traverse left subtree. 2. Visit the node. 3. Recursively traverse right subtree.
  9. What is the order of operations in a post-order traversal?

    1. Recursively traverse left subtree. 2. Recursively traverse right subtree. 3. Visit the node.
  10. How does recursion work in tree traversals?

    Each node executes the same policy (e.g., visit node, go left, go right) but with a different state (stack frame) depending on its position in the tree.

  11. What is the time complexity of traversing a binary tree with nnn nodes?

    O(n)O(n)O(n) — linear time, because each node is visited exactly once.

  12. What property does in-order traversal of a binary search tree (BST) have?

    It visits nodes in ascending order (sorted order).

  13. In a binary search tree, how are values arranged?

    For any node, all values in the left subtree are less than the node's value, and all values in the right subtree are greater.

  14. What is a leaf node in a binary tree?

    A node with no children.

Card 1 of 14
Card 1 of 14

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent