Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

merge(): Given 2 lists whose elements are in increasing order, merge them into o

ID: 3851498 • Letter: M

Question

merge(): Given 2 lists whose elements are in increasing order, merge them into one list of elements in increasing order The code is below. The idea is to step through both lists one element at a time. Compare two elements, one from each list, and put the smaller into the merged list. If you reach the end of either list, add the rest of the other list to the end of the merged resu def merge (listA, listB): Given 2 lists whose elements are in increasing order, merge them into one list of elements in increasing order :param listA: a list in increasing order :param listB: a list in increasing order return: a list with all elements in increasing order 31 result = [] indexA O indexB0 while indexA

Explanation / Answer

Blackbox:- 1. Provide2 lists of same size. 2. Both lists contains duplicate elements. 3. Provide 2 lists of different sizes.

Whitebox:- 1. Two lists with different datatypes, ex- integer, decimals. 2. Two lists with same dataType. 3. Result is in sorted order or not.