Nisum interview question

remove dublicate elements from array without using collection framework with complexity O(n)