added algorithm that removes duplicate char in a string.