Friendly Counter method in Ruby
In this guide you will learn how to group a sequence of letters using the friendly_counter method
Guide Tasks
- Read Tutorial
- Complete the Exercise
Summary
Build a method that can group a sequence of letters using the friendly counter method.
Exercise Description
Define a method that can group a sequence of letters including unsorted strings and integers.
Example Data
'aaabbbbbbccc' -> ["aaa", "bbbbbb", "ccc"] 'aabbcccca' -> ["aaa", "bb", "cccc"] '14832131' -> ["111", "2", "33", "4", "8"]
Real World Usage
This exercise can help you in learn how to parse through data in a more efficient way.