47
47
- [ Depth First Search (DFS)] ( #depth-first-search-dfs )
48
48
- [ Algorithms Q&A] ( #algorithms-qa )
49
49
- [ Merge Sort] ( #merge-sort )
50
- - [ Quick Sort] ( #quick-sort )
51
50
- [ Find Median Values (With Merge Sort Algorithm)] ( #find-median-values-with-merge-sort-algorithm )
52
- - [ Quick Sort] ( #quick-sort-1 )
53
- - [ Quick Sort Implementation] ( #quick-sort-implementation )
51
+ - [ Quick Sort] ( #quick-sort )
54
52
- [ Math & Stats] ( #math--stats )
55
53
- [ Integer Division Without Using \* or /] ( #integer-division-without-using--or- )
56
54
- [ Array slice] ( #array-slice )
@@ -477,8 +475,20 @@ Merge Sort Implementation Visualization:
477
475
- [ Merge Sort Implementation Question] ( https://codepen.io/roopkt/pen/ExWRRgP?editors=0010 )
478
476
- [ Merge Sort Implementation Answer] ( https://codepen.io/roopkt/pen/ZEeMPPL?editors=0010 )
479
477
478
+ #### Find Median Values (With Merge Sort Algorithm)
479
+
480
+ 2 sorted arrays find the median element. Median is the middle index its not an average of values in an sorted array.
481
+
482
+ ![ ] ( https://i.imgur.com/anPm3Yx.png )
483
+
484
+ So in order to find median we can use the stich algorithm since arrays are already sorted. Then we can find the middle index.
485
+
486
+ [ Find Median Values Question & Answer] ( src/sorting/merge-sort/find-median-values.mjs )
487
+
480
488
### Quick Sort
481
489
490
+ When Browser's are not using Merge sort they most of the time use Quick sort variations. Most powerful sorting algorithm
491
+
482
492
** Quick sort Algorithm**
483
493
484
494
![ Quick sort Algorithm] ( https://i.imgur.com/m61xGnU.png )
@@ -499,26 +509,18 @@ Merge Sort Implementation Visualization:
499
509
500
510
![ Quick Sort Partition Algorithm Simulation] ( https://i.imgur.com/CkpjhGn.png )
501
511
502
- #### Find Median Values (With Merge Sort Algorithm)
503
-
504
- 2 sorted arrays find the median element. Median is the middle index its not an average of values in an sorted array.
505
-
506
- ![ ] ( https://i.imgur.com/anPm3Yx.png )
507
-
508
- So in order to find median we can use the stich algorithm since arrays are already sorted. Then we can find the middle index.
509
-
510
- [ Find Median Values Question & Answer] ( src/sorting/merge-sort/find-median-values.mjs )
512
+ ![ ] ( https://i.imgur.com/LudZhvH.png )
511
513
512
- ### Quick Sort
514
+ ** Implement Quick Sort Algorithm Question**
515
+ [ Implement Quick Sort Question] ( https://codepen.io/roopkt/pen/NWpzMRv?editors=0010 )
513
516
514
- When Browser's are not using Merge sort they most of the time use Quick sort variations.
517
+ ** Quick Sort Answer with extra Array Space complexity O(n) **
515
518
516
- ![ ] ( https://i.imgur.com/LudZhvH.png )
519
+ [ Implement Quick Sort Answer ] ( https://codepen.io/roopkt/pen/eYvKrvP?editors=0010 )
517
520
518
- #### Quick Sort Implementation
521
+ ** Quick Sort Answer in-place partition with Space complexity O(1) Most Efficient algorithm **
519
522
520
- - [ Implement Quick Sort Question] ( https://codepen.io/roopkt/pen/NWpzMRv?editors=0010 )
521
- - [ Implement Quick Sort Answer] ( https://codepen.io/roopkt/pen/eYvKrvP?editors=0010 )
523
+ [ Implement IN place Quick Sort Answer] ( https://codepen.io/roopkt/pen/OJpBYKz?editors=0010 )
522
524
523
525
## Math & Stats
524
526
0 commit comments