Plateau problem
Given a sorted array in non-descending order, the element type can be positive integer or char, return the length of the longest consecutive segments
Example,
Input:"1223334556", output 3
Input: "abccdef", output 2
This problem is call the Plateau problem, and it has once confused the famous computer scientist David Gries
Here is a solution
Read full article from Plateau problem - zdd - 博客园
No comments:
Post a Comment