Given an array with integers, return the array so that it will not have any consecutive duplicates.
Utilisateur anonyme
quickest answer is to run through array and do: check value in hash if not there then add it to hash and print if it is there do nothing O(n) in operation and memory