CMPINF 401 EXTRA CREDIT #4: PURGE DUPES FROM ARRAY
YOU ARE NOT ALLOWED TO USE JAVA BUILT IN OBJECTS: Set, List, TreeSet, HashSet, TreeMap, HashMap, LinkedList, ArrayList to solve this problem.
Here is your starter file
You have only one method to fill in. It is the purgeDupes method.
CHANGE NOTHING IN THIS FILE EXCEPT THE CONTENTS OF THE purgeDupes() METHOD
You are given the following input files used by your PurgeDupes program.
Both of these input files are sorted both contain dupes. You must remove them and leave only the one original of each value. You must also preserve the sorted ordering.
You must do it as efficient as possible. i.e. O(N) time. one pass across the array.
You have only one method to fill in. It is the purgeDupes method.
CHANGE NOTHING IN THIS FILE EXCEPT THE CONTENTS OF THE purgeDupes() METHOD
Below is the expected correct output
original list1: alpha bravo bravo charlie delta echo echo echo echo foxtrot golf hotel india zebra zebra
purged list1: alpha bravo charlie delta echo foxtrot golf hotel india zebra
original list2: A A A B C D E E E F G H H I J J J
purged list2: A B C D E F G H I J