Skip to content

Commit 63e20a5

Browse files
committed
Exercises, typo
1 parent 43293a9 commit 63e20a5

File tree

5 files changed

+34
-2
lines changed

5 files changed

+34
-2
lines changed

src/algorithms/explanations/msort_arr_bup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ fit into main memories. Historically, when data was primarily stored on
3535
magnetic tape, versions of bottom up merge sort were absolutely essential.
3636
There are recursive "top down" versions of merge sort, shown elsewhere.
3737
There is also a "natural" merge sort which utilises already sorted runs,
38-
also shown elsewhere
38+
also shown elsewhere.
3939

src/algorithms/extra-info/AVLInfo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ into a grandchild of a node. Why can't it be caused by just adding a
2828
new child to a node?
2929

3030
In the worst case for simple binary trees, every node except one has a
31-
single chlild. Find some worst case AVL trees.
31+
single child. Find some worst case AVL trees.
3232

3333
The AIA insertion code is recursive. What possible ways are there to
3434
write a non-recursive version?

src/algorithms/extra-info/msort_arr_bup.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,14 @@ Geeks for Geeks Link: [**Iterative Merge Sort**][G4GLink]
2020

2121
[G4GLink]: https://www.geeksforgeeks.org/iterative-merge-sort/
2222

23+
24+
## Exercises/Exploration
25+
26+
Compare and contrast the sequence of merge operations performed by
27+
top-down and bottom-up merge sort when the number of elements to be
28+
sorted is a power of two.
29+
30+
Compare and contrast the sequence of merge operations performed by
31+
bottom-up and natural merge sort when a) the input is reverse-sorted and
32+
b) the input is sorted.
33+

src/algorithms/extra-info/msort_arr_nat.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,14 @@ Happy Coders Link: [**Natural Merge Sort**][HCLink]
2020

2121
[HCLink]: https://www.happycoders.eu/algorithms/merge-sort/#Natural_Merge_Sort
2222

23+
24+
## Exercises/Exploration
25+
26+
Compare and contrast the sequence of merge operations performed by
27+
bottom-up and natural merge sort when a) the input is reverse-sorted and
28+
b) the input is sorted.
29+
30+
This version of merge sort adapts well to partially sorted input. Can
31+
you come up with a version of merge sort that adapts well to both
32+
partially sorted and partially reverse-sorted input?
33+

src/algorithms/extra-info/msort_arr_td.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,13 @@ Geeks for Geeks Link: [**Merge Sort**][G4GLink]
2020

2121
[G4GLink]: https://www.geeksforgeeks.org/merge-sort/
2222

23+
24+
## Exercises/Exploration
25+
26+
Compare and contrast the sequence of merge operations performed by
27+
top-down and bottom-up merge sort when the number of elements to be
28+
sorted is a power of two.
29+
30+
Compare and contrast the structure of top-down merge sort with that of
31+
quicksort.
32+

0 commit comments

Comments
 (0)