Needs to be done in c++
Design and implement an algorithm that determines whether or nota given array of integers, list1, is completely contained withinanother given array of integers, list2. Consider two differentscenarios: (1) Both arrays are unsorted and (2) both arrays aresorted and write functions unsortedSearch and sortedSearch for (1)and (2), respectively. Your algorithm for (2) is expected to bemore efficient than the one for (1).
Expert Answer
An answer will be send to you shortly. . . . .