@@ -307,7 +307,7 @@ Example: Suppose you have given a tree structure and asked to calculate the aver
307
307
308
308
![ ] ( https://i.imgur.com/DdFyXGx.png )
309
309
310
- - [ Breadth-first Traversal Exercise ] ( https://codepen.io/roopkt/pen/bGqjVZe?editors=0010 )
310
+ - [ Breadth-first Traversal Question ] ( https://codepen.io/roopkt/pen/bGqjVZe?editors=0010 )
311
311
- [ Breadth-first Traversal Answer] ( https://codepen.io/roopkt/pen/XWMBdWv?editors=0010 )
312
312
313
313
#### Depth-first Traversal (DFT)
@@ -323,7 +323,7 @@ The DFS algorithm we start from starting point and go into depth of graph until
323
323
324
324
![ ] ( https://i.imgur.com/DdFyXGx.png )
325
325
326
- - [ Breadth-first Traversal Exercise ] ( https://codepen.io/roopkt/pen/bGqjVZe?editors=0010 )
326
+ - [ Breadth-first Traversal Question ] ( https://codepen.io/roopkt/pen/bGqjVZe?editors=0010 )
327
327
- [ Breadth-first Traversal Answer] ( https://codepen.io/roopkt/pen/XWMBdWv?editors=0010 )
328
328
329
329
#### Difference between Breadth-first vs Depth-first traversal
@@ -359,7 +359,7 @@ Below image showing how to add `[3, 7, 4, 6, 5, 1, 10, 2, 9, 8]` in BST.
359
359
360
360
![ ] ( https://i.imgur.com/qkefQzD.png )
361
361
362
- - [ Binary Search Tree Implementation Exercise ] ( https://codepen.io/roopkt/pen/RwpJBOw?editors=0010 )
362
+ - [ Binary Search Tree Implementation Question ] ( https://codepen.io/roopkt/pen/RwpJBOw?editors=0010 )
363
363
- [ Binary Search Tree Implementation Answer] ( https://codepen.io/roopkt/pen/LYWBYMM?editors=0010 )
364
364
365
365
### Trie
@@ -397,7 +397,7 @@ Graph represents network. It has Nodes, Vertices and Edges.
397
397
398
398
![ ] ( https://i.imgur.com/eqzKDIV.png )
399
399
400
- [ Exercise ] ( https://codepen.io/roopkt/pen/ZEejLJe?editors=0010 )
400
+ [ Question ] ( https://codepen.io/roopkt/pen/ZEejLJe?editors=0010 )
401
401
[ Answer] ( https://codepen.io/roopkt/pen/vYxagrP?editors=0010 )
402
402
403
403
#### Breadth First Search (BFS)
@@ -407,7 +407,7 @@ Find all possible routes from `PHX` to `BKK`. Also then you can decide which pat
407
407
408
408
![ ] ( https://i.imgur.com/Fc8HIae.png )
409
409
410
- [ Exercise Answer Source Code: Find all possible routes using BFS] ( ./src/data-structure/5-graph/breadth-first-search.mjs )
410
+ [ Question Answer Source Code: Find all possible routes using BFS] ( ./src/data-structure/5-graph/breadth-first-search.mjs )
411
411
412
412
![ ] ( https://i.imgur.com/CvPhRQx.png )
413
413
@@ -417,7 +417,7 @@ Find all possible routes from `PHX` to `BKK`. Also then you can decide which pat
417
417
418
418
![ ] ( https://i.imgur.com/wHevaTK.png )
419
419
420
- [ Exercise Answer Source Code: Find shortest path using DFS] ( ./src/data-structure/5-graph/depth-first-search.mjs )
420
+ [ Question Answer Source Code: Find shortest path using DFS] ( ./src/data-structure/5-graph/depth-first-search.mjs )
421
421
422
422
## Algorithms Q&A
423
423
@@ -435,8 +435,8 @@ Merge Sort Implementation Visualization:
435
435
436
436
[ ![ Merge Sort Algorithm Simulator] ( https://img.youtube.com/vi/UxnyImctVzg/0.jpg )] ( https://www.youtube.com/watch?v=UxnyImctVzg ' Merge Sort Algorithm Simulator ')
437
437
438
- - [ Merge Sort Implementation Exercise ] ( https://codepen.io/roopkt/pen/ExWRRgP?editors=0010 )
439
- - [ Merge Sort Implementation Answer] ( https://codepen.io/roopkt/pen/zYZaaZr ?editors=0010 )
438
+ - [ Merge Sort Implementation Question ] ( https://codepen.io/roopkt/pen/ExWRRgP?editors=0010 )
439
+ - [ Merge Sort Implementation Answer] ( https://codepen.io/roopkt/pen/ZEeMPPL ?editors=0010 )
440
440
441
441
#### Find Median Values (With Merge Sort Algorithm)
442
442
@@ -446,7 +446,7 @@ Merge Sort Implementation Visualization:
446
446
447
447
So in order to find median we can use the stich algorithm since arrays are already sorted. Then we can find the middle index.
448
448
449
- [ Exercise File] ( src/sorting/merge-sort/find-median-values.mjs )
449
+ [ Question File] ( src/sorting/merge-sort/find-median-values.mjs )
450
450
451
451
### Quick Sort
452
452
@@ -456,7 +456,7 @@ When Browser's are not using Merge sort they most of the time use Quick sort var
456
456
457
457
#### Quick Sort Implementation
458
458
459
- - [ Implement Quick Sort Exercise ] ( https://codepen.io/roopkt/pen/NWpzMRv?editors=0010 )
459
+ - [ Implement Quick Sort Question ] ( https://codepen.io/roopkt/pen/NWpzMRv?editors=0010 )
460
460
- [ Implement Quick Sort Answer] ( https://codepen.io/roopkt/pen/eYvKrvP?editors=0010 )
461
461
462
462
### BFS (Breath First Search)
@@ -481,7 +481,7 @@ Slice does not mutate the original array.
481
481
[ Example of slice] ( https://i.imgur.com/9iaew6W.png ) :
482
482
483
483
``` js
484
- [20 ,39 ,48 ,58 ,16 ,36 ,48 ].slice (0 ,3 ) = [20 ,39 ,48 , 58 ]
484
+ [20 ,39 ,48 ,58 ,16 ,36 ,48 ].slice (0 ,3 ) = [20 ,39 ,48 ]
485
485
[20 ,39 ,48 ,58 ,16 ,36 ,48 ].slice (3 ,7 ) = [58 ,16 ,36 ,48 ]
486
486
```
487
487
0 commit comments