Reference no: EM133258782
What is the efficient algorithm to find all the combination of inserting an array A into another array B, but keeping order of these two arrays. (array A and B are same size)
E.g)
Array A = {1,2,3,4}
Array B = {5,6,7,8}
Merged array 1 = {5,1,2,3,4,6,7,8}
Merged array 2 = {5,1,6,2,3,7,4,8}
.... Many more combinations......
Merged array n = {1,5,6,2,3,7,4,8}