remove duplcate char in un-sorted array