HARMAN Interview Question

Write a algorithm to Remove all duplicates elements from array without using any library functions?