In your algorithm you will need to compare the keys of the


Add a merge() method to the OrdArray class in the orderedArray.java program (Listing 2.4) so that you can merge two ordered source arrays into an ordered destination array. Write code in main() that inserts some random numbers into the two source arrays, invokes merge(), and displays the contents of the resulting destination array. The source arrays may hold different numbers of data items. In your algorithm you will need to compare the keys of the source arrays, picking the smallest one to copy to the destination. You'll also need to handle the situation when one source array exhausts its contents before the other.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: In your algorithm you will need to compare the keys of the
Reference No:- TGS01647506

Expected delivery within 24 Hours