Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 20. Searching and Sorting > Self-Review Exercises

Self-Review Exercises

20.1Fill in the blanks in each of the following statements:
  1. A selection sort application would take approximately ____________ times as long to run on a 128-element array as on a 32-element array.

  2. The efficiency of merge sort is ____________.

20.2What key aspect of both the binary search and the merge sort accounts for the logarithmic portion of their respective Big Os?
20.3In what sense is the insertion sort superior to the merge sort? In what sense is the merge sort superior to the insertion sort?
20.4In the text, we say that after the merge sort splits the array into two subarrays, it then sorts these two subarrays and merges them. Why might someone be puzzled by our statement that “it then sorts these two subarrays”?


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial