Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
CS foundations
/
Recursion
A recursive depth-first traversal visits every node in a balanced binary tree with n node…
from Recursion
Python 3.14
intermediate
1 min
A recursive depth-first traversal visits every node in a balanced binary tree with n nodes. What are its usual time and call-depth bounds?
O(n) time and O(log n) call depth
O(log n) time and O(n) call depth
O(n log n) time and O(1) call depth
O(n) time and O(n) call depth for every tree shape
Check
Ask AI about this kata
Report an error
next kata
A recursive pre-order traversal visits children from left to right. How should an equival…
Quiz
A new version is available
Reload