Computer Science Homework Help

IGlobal University Insertion sort algorithm Questionnaire

 

Q.1) Analyze the Insertion sort and the Merge sort algorithms posted in this module. Write the formula for the algorithms.
Post your answers and source. Q.2) Find an algorithm to find all the common elements in two sorted lists of numbers. For example, for the lists 2, 5, 5, 5 and 2, 2, 3, 5, 5, 7, the output should be 2, 5. What is the maximum number of comparisons the algorithm makes if the lengths of the two given lists are m and n, respectively? Post your answers, code, and source.