First ask yourself: what constitutes a duplicate value? Instead of going straight to the keyboard to solve this problem, sit at the table with a deck of cards. Ignoring the suits, lay all (or a portion) of the cards out in front of you. Now working from right to left, work through each card and see if it qualifies as a duplicate per your answer from above. This might look something like:
Compare card 52 to card 51. If they match, remove card 52 from array.
Compare card 51 to card 50. If they match, remove card 51 from array.
Compare card 50 to card 49. If they match, remove card 50 from array.
...
Compare card 1 to card 0. If they match, remove card 1 from array.
An alternative would be if the card is unique, move it to a separate array. Now you can destroy the original array and be left with an array of just unique items. There are other ways to skin this cat, but it's really going to boil down to what makes the most sense to you. You might not initially have the most elegant or efficient solution as others on this board could come up with, but those skills come in time.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles