Sunday, 20 November 2011

Given a array of numbers we need to remove duplicates and arrange the distinct elements in the same order and rest of the array should be filled with 0, provided the repeating elements will be adjcent to each other
note: do not use extra spaces(do not use another array)

sample ip : 224444557   (ip will not be of this format : 242234, i.e. repeating ele will be adjcent to each other)
op : 245700000

No comments:

Post a Comment