We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19637ee commit 1f44da7Copy full SHA for 1f44da7
README.md
@@ -16,6 +16,15 @@
16
- Keys in the right subtree of a node are larger than the node’s key.
17
- Duplicate keys are not allowed.
18
19
+ Time Complexity:
20
+ Search, Insert, Delete:
21
+ - Average Case: O(log n) => This occurs when the BST is balanced.
22
+ - Worst Case: O(n) => This occurs when the BST is skewed.
23
+
24
+ Space Complexity:
25
+ - Space for the BST: O(n).
26
+ - Recursive Operations: O(h), where h is the height of the tree.
27
28
**Methods**
29
- **`insert(key)`**:
30
- Inserts a specified key into the Binary Search Tree (BST) while maintaining BST properties.
0 commit comments