RemoveDuplicates from LeetCode done in C