Goldman Sachs Interview Question for Software Engineer / Developers
- 0of 0 votes
Asked in Google - 2020, Goldman Sachs - 2020- Gaurav Sohaliya August 22, 2020 in India
Given two Array.
A = [1,3,4,2,5,6] B = [3,4,6,5,7]
we have to remove 3,1,2,6 and Insert 6,7 to make A equal to B.
we can delete and insert any element at anywhere from first array and make that array same as second array. Output is Minimum Number of elements required to be insert in first array.
1 <= First Array Size <= 10^5
1<= Second Array SIze <= 10^5
1 <= firstarray[i] <= 10^9
1 <= secondarray <= 10^9
second array consist of distinct element.
Note : it is same as edit distance but here our constraints are 10^5.
| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Arrays
Interview Type: Written Test
Open Chat in New Window