Maximum consecutive all-Y requests.
Unlock detailed company stats for this questionUpgrade
Given a list of strings, one per request across machines, find the maximum number of consecutive requests in which all machines respond with Y. Example: ["YYN", "NNN", "YNY", "YYY", "YYY"] gives 2, ["YYY", "YYY", "YNY", "YYY", "YYY", "YYY"] gives 3 and [] gives 0.
Community answers
No answers contributed by the community yet.
Related questions
Maximum Coins From K Consecutive Bags Max Consecutive Ones III.Longest Consecutive Sequence.Related courses

Course

Course
Course
