Tuesday, March 12, 2013

Determine or find duplicates in an Array


Question:
Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.
Answer:
Obviously I have posted a solution in an earlier post. Search that in this website.
But the point is "Is there an O(n) time solution that uses only O(1) extra space and does not destroy the original array?"
Anyone???
For answer email me.
My email Id. Huh!! If you can't find from this website, you are not understanding that you are not solving a simple puzzle of finding an email id. Cumon now, find that!!

No comments:

Post a Comment