Check Alphabetical Order
Problem Overview
- Check if the input string characters are in alphabetical order; if not, output the first index where the order breaks.
- Input: a single string (inputString). Output: '0' if ordered; otherwise the index of the out-of-order character. Constraints: unknown.
- Domain: string processing and text validation, useful for verifying sorted or normalized textual data.
- This coding interview problem is a Cisco interview question often used to assess candidates in an interview context.
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:
