Michael Ouroumis logoichael Ouroumis
Back to course
Mastering DSA with JavaScript: Code & Conquer Algorithms in Your Browser/4.2: Binary Trees/Binary Tree Traversals (Inorder, Preorder, Postorder, BFS)

Binary Tree Traversals – Quiz

  1. 1. What is the Inorder (DFS) visiting order?

  2. 2. For a Binary Search Tree (BST), which traversal prints keys in ascending order?

  3. 3. Which traversal uses a queue by default?

  4. 4. Which traversal visits the root node last?

  5. 5. Given this tree: Root=A; children: B (left), C (right); B's children: D (left), E (right); C's children: F (left), G (right). What is the Preorder?

  6. 6. Which traversal is most suitable for safely freeing/deleting all nodes (post-order resource cleanup)?