Skip to content
loading...

re: Find duplicates algorithm series- A SORTED array as an input. VIEW POST

FULL DISCUSSION
 

I just made an inplace algorithm to move the duplicates replaced with zeros to the end of array, this runs in O(n) time and O(1) space, you can find the code for the same here : codepen.io/karthik19894/pen/XWWwbw...

code of conduct - report abuse