2020 - [ Stack] ( #stack )
2121 - [ Popping element from stack] ( #popping-element-from-stack )
2222 - [ Queue] ( #queue )
23- - [ Dequeue an element from Queue] ( #dequeue-an-element-from-queue )
2423 - [ Enqueue an element in Queue] ( #enqueue-an-element-in-queue )
24+ - [ Dequeue an element from Queue] ( #dequeue-an-element-from-queue )
2525 - [ Tree] ( #tree )
2626 - [ Binary Tree] ( #binary-tree )
2727 - [ Binary Search Tree (BST)] ( #binary-search-tree-bst )
3838 - [ Merge Sort Algorithm Simulator] ( #merge-sort-algorithm-simulator )
3939 - [ Implement Merge Sort] ( #implement-merge-sort )
4040 - [ Find Median Values (With Merge Sort Algorithm)] ( #find-median-values-with-merge-sort-algorithm )
41+ - [ Quick Sort] ( #quick-sort )
4142 - [ BFS (Breath First Search)] ( #bfs-breath-first-search )
4243- [ Math & Stats] ( #math--stats )
4344 - [ Integer Division Without Using \* or /] ( #integer-division-without-using--or- )
@@ -238,6 +239,16 @@ stack.pop(); // 1 , stack []
238239
239240Breadth First Search (BFS) uses a ` queue ` for storing the nodes that it is visiting.
240241
242+ #### Enqueue an element in Queue
243+
244+ ``` ts
245+ var queue = [];
246+
247+ queue .push (1 ); // queue [1]
248+ queue .push (2 ); // queue [1,2]
249+ queue .push (3 ); // queue [1,2,3]
250+ ```
251+
241252#### Dequeue an element from Queue
242253
243254``` ts
@@ -248,16 +259,6 @@ queue.shift(); // 3 , queue [4]
248259queue .shift (); // 4 , queue []
249260```
250261
251- #### Enqueue an element in Queue
252-
253- ``` ts
254- var queue = [];
255-
256- queue .unshift (1 ); // queue [1]
257- queue .unshift (2 ); // queue [2,1]
258- queue .unshift (3 ); // queue [3,2,1]
259- ```
260-
261262### Tree
262263
263264A tree has hierarchical data and it has nodes.
@@ -385,6 +386,13 @@ So in order to find median we can use the stich algorithm since arrays are alrea
385386
386387[ Exercise File] ( src/sorting/merge-sort/find-median-values.mjs )
387388
389+ ### Quick Sort
390+
391+ ![ ] ( https://i.imgur.com/LudZhvH.png )
392+
393+ - [ Implement Quick Sort Question] ( https://codepen.io/roopkt/pen/NWpzMRv?editors=0010 )
394+ - [ Implement Quick Sort Answer] ( https://codepen.io/roopkt/pen/eYvKrvP?editors=0010 )
395+
388396### BFS (Breath First Search)
389397
390398## Math & Stats
0 commit comments