Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose that you have a large collection of songs, each with an band name and a title, for example: ( Bon Jovi, Livin' on a

Suppose that you have a large collection of songs, each with an band name and a title, for example:
(Bon Jovi, Livin' on a Prayer)
(AC/DC, Back In Black)
(Queen, We Will Rock You)
(Bon Jovi, It's My Life)
(Queen, Bohemian Rhapsody)
(AC/DC, Thunderstruck)
...
You want to rearrange the songs so that they are primarily ordered by band name, and if multiple songs have the same band name, you want them to be ordered by title. For the above example, this means you want the songs to be ordered like so (note that this is not the entire collection, so there would be other songs interspersed):
(AC/DC, Back In Black)
(AC/DC, Thunderstruck)
(Bon Jovi, It's My Life)
(Bon Jovi, Livin' on a Prayer)
(Queen, Bohemian Rhapsody)
(Queen, We Will Rock You)
Which of the following sequences of sorts will help you achieve this? Select all that apply.
(a)
1. Sort the collection of songs by band name using bubble sort
2. Then sort the resulting collection of songs by title using quick sort
(b)
1. Sort the collection of songs by band name using shell sort
2. Then sort the resulting collection of songs by title using merge sort
(c)
1. Sort the collection of songs by band name using insertion sort
2. Then sort the resulting collection of songs by title using insertion sort
(d)
1. Sort the collection of songs by title using selection sort
2. Then sort the resulting collection of songs by band name using insertion sort
(e)
1. Sort the collection of songs by title using merge sort
2. Then sort the resulting collection of songs by band name using quick sort
(f)
1. Sort the collection of songs by title using insertion sort
2. Then sort the resulting collection of songs by band name using bubble sort

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

Evaluate employees readiness for training. page 275

Answered: 1 week ago