Skip to content

Commit 6f16fdf

Browse files
authored
Update data_structures.md
1 parent 89ddfd4 commit 6f16fdf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

notes/data_structures.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ A _stack_ is a fundamental data structure that models a First-In-Last-Out (FILO)
130130
[1] <- bottom
131131
```
132132

133-
#### Key Interface Methods
133+
#### Interface Methods
134134

135135
Typical operations associated with a stack include:
136136

@@ -200,7 +200,7 @@ Queues are incredibly versatile and find use in a variety of real-world scenario
200200

201201
#### Comparing Stacks and Queues
202202

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:
204204

205205
- The stack operates on a Last-In-First-Out (LIFO) principle, while the queue follows a **First-In-First-Out (FIFO)** principle.
206206
- 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
298298
[4] [5] [6]
299299
```
300300

301-
#### Key Operations of the BST Interface
301+
#### Operations of the BST Interface
302302

303303
The fundamental operations provided by a BST are:
304304

@@ -378,7 +378,7 @@ AVL trees support standard BST operations with some modifications to maintain ba
378378

379379
#### Implementation of AVL Trees
380380

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:
382382

383383
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.
384384
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
403403
(10B) (25B) (35B) (50B)
404404
```
405405

406-
#### Key Properties of Red-Black Trees
406+
#### Properties of Red-Black Trees
407407

408408
Red-Black trees abide by the following essential properties:
409409

0 commit comments

Comments
 (0)