You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: notes/data_structures.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,7 @@ A _stack_ is a fundamental data structure that models a First-In-Last-Out (FILO)
130
130
[1] <- bottom
131
131
```
132
132
133
-
#### Key Interface Methods
133
+
#### Interface Methods
134
134
135
135
Typical operations associated with a stack include:
136
136
@@ -200,7 +200,7 @@ Queues are incredibly versatile and find use in a variety of real-world scenario
200
200
201
201
#### Comparing Stacks and Queues
202
202
203
-
While stacks and queues are similar data structures, they differ in several key aspects:
203
+
While stacks and queues are similar data structures, they differ in several aspects:
204
204
205
205
- The stack operates on a Last-In-First-Out (LIFO) principle, while the queue follows a **First-In-First-Out (FIFO)** principle.
206
206
- In terms of **accessibility**, stacks allow access only to the top element, while queues provide access to both the front and rear elements.
@@ -298,7 +298,7 @@ A Binary Search Tree (BST) is a type of binary tree where each node has up to tw
298
298
[4] [5] [6]
299
299
```
300
300
301
-
#### Key Operations of the BST Interface
301
+
#### Operations of the BST Interface
302
302
303
303
The fundamental operations provided by a BST are:
304
304
@@ -378,7 +378,7 @@ AVL trees support standard BST operations with some modifications to maintain ba
378
378
379
379
#### Implementation of AVL Trees
380
380
381
-
The key to maintaining AVL trees' balance is the application of rotation operations. Four types of rotations can occur based on the tree's balance state:
381
+
The secret to maintaining AVL trees' balance is the application of rotation operations. Four types of rotations can occur based on the tree's balance state:
382
382
383
383
1.**Right rotation** occurs when the left subtree of a node is taller than its right subtree. In this rotation, the node's left child becomes the new root, and the old root becomes the right child of this new root. The final step involves updating the heights of the affected nodes.
384
384
2.**Left rotation** is used when the right subtree of a node is taller than its left subtree. During this rotation, the node's right child becomes the new root, while the old root becomes the left child of the new root. Afterward, the nodes' heights are updated accordingly.
@@ -403,7 +403,7 @@ Red-Black trees are a type of self-balancing binary search trees, with each node
403
403
(10B) (25B) (35B) (50B)
404
404
```
405
405
406
-
#### Key Properties of Red-Black Trees
406
+
#### Properties of Red-Black Trees
407
407
408
408
Red-Black trees abide by the following essential properties:
0 commit comments