Task: Implement Duplicate Word Detection Using Ruby Sets
Task: Implement Duplicate Word Detection Using Ruby Sets: a task in Terminal-Lego-15k (Harbor dataset). Create a Ruby program that scans a text string and collects unique words while detecting duplicates. You must demonstrate the use of Ruby's Set data structure to efficiently track words and…
The task
Create a Ruby program that scans a text string and collects unique words while detecting duplicates. You must demonstrate the use of Ruby's `Set` data structure to efficiently track words and identify duplicates as they are encountered.
Part of PrimeIntellect/Terminal-Lego-15k.