Retired
(NOP) Processing of character strings (retired)
32 of 38Kevin-Haus24
Description:
Lines consisting of characters indicating uppercase letters of the Latin alphabet will be added to the input.
Determine the maximum number of consecutive characters, among which no two letters from the set of letters N, O and P (taking into account repetitions) are written in a row. Spaces should not be taken into account.(ignore spaces altogether)
To perform this task, you should write a function.
Example:
For the AAANAPOAA string, the answer will be 6.
'PO' divides our line into two lines and the maximum length will be at the first line.
If the line is empty, return 0.
If the string contains a number, return -1.
Good luck!
Similar Kata:
Stats:
Created | Jun 30, 2023 |
Warriors Trained | 83 |
Total Skips | 9 |
Total Code Submissions | 388 |
Total Times Completed | 38 |
Python Completions | 32 |
JavaScript Completions | 17 |
C Completions | 2 |
Total Stars | 2 |
% of votes with a positive feedback rating | 72% of 27 |
Total "Very Satisfied" Votes | 14 |
Total "Somewhat Satisfied" Votes | 11 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 26 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 7 kyu |