Remove duplicates from string without additional data structures #7