Data Structured65_q4a_bst_at_level
BST at level
fa61aa86-5d42-4e96-8f51-8c793c205561.cppC++
1// Loading code...Selected Submission
100 / 100
0.098s
6332 KB
Tree
Time Comp.
O(N) where N is the number of nodes in the tree, in the worst case (skewed tree).
Space Comp.
O(H) where H is the height of the tree, due to the recursion stack. In the worst case (skewed tree), H = N, and in the best case (balanced tree), H = log N.
Readability
7/10
"The code implements a binary search tree (BST) and provides a function to retrieve all keys at a specific level. This inherently involves a tree data structure and recursion for traversal."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #3 | 100 | 11/16/2024 |
| Try #2 | 0 | 11/16/2024 |
| Try #1 | 0 | 11/16/2024 |