File tree Expand file tree Collapse file tree 5 files changed +34
-2
lines changed Expand file tree Collapse file tree 5 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -35,5 +35,5 @@ fit into main memories. Historically, when data was primarily stored on
3535magnetic tape, versions of bottom up merge sort were absolutely essential.
3636There are recursive "top down" versions of merge sort, shown elsewhere.
3737There is also a "natural" merge sort which utilises already sorted runs,
38- also shown elsewhere
38+ also shown elsewhere.
3939
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ into a grandchild of a node. Why can't it be caused by just adding a
2828new child to a node?
2929
3030In 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
3333The AIA insertion code is recursive. What possible ways are there to
3434write a non-recursive version?
Original file line number Diff line number Diff 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+
Original file line number Diff line number Diff 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+
Original file line number Diff line number Diff 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+
You can’t perform that action at this time.
0 commit comments