Droidshift interview question

Remove duplicate elements from a given array, check if the code provided for factorial was correct.