Longest Cipher (Intuit India)
Longest Cipher (Intuit India) coding interview problem: Given a string of alphanumeric characters, find the length of the longest contiguous substring that qualifies as a valid cipher: it must include at least one uppercase letter and contain no digits. Return -1 if no such substring exists. Common Intuit interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
