RUBY: Remove duplicates in string using a single buffer #algorithm #quiz