Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Removing Duplicates in O(k) time (http://www.go4expert.com/forums/removing-duplicates-o-k-time-t22149/)

pavankumar.thati 20May2010 13:00

Removing Duplicates in O(k) time
Q An array of size k contains integers between 1 and n. You are given an additional scratch array of size n. Compress the original array by removing duplicates in it. What if k << n?

ANS : I solved the problem.But i want to solve the problem in O(k) time with out using auxiliary array can any one plz help me out .....

All times are GMT +5.5. The time now is 05:27.