longestRun 🌶️🌶️
A run is a stretch of the same character repeated in a row. Write a method longestRun that takes a String s and returns the length of its longest run. The empty String has a longest run of 0.
For example, longestRun("aabbbcc") is 3 (the bbb), longestRun("abc") is 1, and longestRun("aabaaa") is 3.
Compare each character with the one before it. Does the current run grow, or start over at 1?
When do you check whether the current run is the best so far? What if the longest run is the last one?