Interview Question

Anonymous Interview Bangalore (India)

Array question

Answer

Interview Answer

1 Answer

0

Given two array
1st array m elements
2nd array n+m elements
Both the array have sorted numbers
Copy all the elements of 1st array to second array so that second array contains n+m sorted elements at the end

Optimal solution O(m+n)

Interview Candidate on Feb 15, 2012

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up