Merge Sort


Merge Sort Problems

Problem : In the course of a merge sort on a 64 element list, how many times must the list be split?


Problem : Consider the following pairs of lists:

  • A. (3, 5, 7, 9) and (2, 4, 6, 8)
  • B. (1, 2, 3, 4) and (5, 6, 7, 8)
Which pair is more efficiently merged?


Problem : Below is an 8 element list that has been broken down into 8 one element lists. Show the merging of the lists to form and ordered list. (6), (3), (8), (2), (9), (1), (5), (7)


Problem : The list above required 7 merges to be sorted. In general, how many merges will be performed in an n element list (for the sake of simplicity, assume that n is a power of 2)?


Take a Study Break

SparkLife

Star Trek gets SEXY

Chris Pine and Zoe Saldana heat up the red carpet!

SparkLife

Are you afraid of relationships?

Auntie SparkNotes can help!

SparkLife

Wanna get JLaw's gorgeous glow?

Click here for simple, sexy makeup tricks!

SparkLife

Sexy starlet style

See every single look from the Met Gala!

SparkLife

Who'd be on your zombie-apocalypse crew?

We already dib'sed Genghis Khan.

Geek out!

The MindHut

Geeky Actresses: Then and Now

Before the fame!

The MindHut

9 Scientific Inaccuracies in Iron Man 3

Click to see what they got wrong.

The MindHut

Top 10 Predictions Sci-Fi Got WRONG

So wrong, they're WRONG.

The MindHut

The 15 Most Awesome Robots, Ever

These Robots Rock!

The MindHut

If You Like Game of Thrones...

...Then you'll LOVE these books!

The Book

Cover image

Read What You Love, Anywhere You Like

Get Our FREE NOOK Reading Apps