Skip to content
loading...

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

TOP OF THREAD FULL DISCUSSION
re: Try running this array example int[] arr = new int[]{1,2,2,3,4,4,5,6,3, 9, 8, 7,9999}; :D
 

That is not the correct sample data set for this problem as problem statement specifies that input array must be sorted.

Although I realized that repl was pointing to code base of different problem.I have attached a right code base now.

 

Yeah I was using repl code example and just changed last element. Was pointing this out because I know some people learning Java will try stuff with the code and be confused about results.

code of conduct - report abuse