Write a function which takes 2 arrays- One array is the source array and the other array is the array of indices and delete all those elements present at the indices of the source array taking the indices from the second array
I didnt get the question. Mohamed Sanaulla needed your help in this
I see the question isnt straight forward as I thought when I wrote it. Let me clear it here:
This is fairly straight forward, but there were some restrictions posed with regards to the complexity and other things which I cant recall (its been almost 3yrs since that question has been asked)
Did you mean to post that in Jobs Discussion? Henry will probably move this discussion.
What sort of arrays are they? Presumably the indices array is an int[], but is the other array an Object[] or an array of primitives? By remove, I presume you mean replace by null or whichever type of zero is appropriate for this primitive?
I would have thought that is an easy question, and a solution will run in linear time.
I cant recall other things which the interviewer mentioned regarding the question. But surely its an array of ints and also the index array is on int. I think one should be able to find this question among other array based questions for interviews.
subject: One array Query--Mohamed Sanaulla this question is frm your blog