Amazon VO Interview Question: Alexa Validator String Validation

15 Views
No Comments

Alexa Validator

Input: "Alexa, turn on the music"

Rule: Starts with Alexa

Output: VALID

This problem asks you to validate whether a given input string starts with the prefix Alexa. In the sample, "Alexa, turn on the music" satisfies the rule, so the output is VALID. The key idea is a simple prefix check, typically using a startsWith-style comparison, while paying attention to exact characters such as case, spaces, and punctuation.

END
 0