The Count the Number of Vowel Strings in Range coding problem asks you to count how many strings in a given array (within a specific range of indices ) are "vowel strings." A vowel string is defined as a string that both starts and ends with a vowel ('a', 'e', 'i', 'o', 'u').
PayPal uses this "Easy" question to test basic array slicing and character validation. It evaluations if a candidate can correctly iterate over a sub-segment of an array and perform multiple character checks on strings. It’s a foundational problem used to ensure a candidate is comfortable with basic syntax and logic.
This problem uses a simple Linear Scan with Character Validation.
{'a', 'e', 'i', 'o', 'u'}.count = 0.left to right inclusive.i:
s[0] is a vowel.s[s.length() - 1] is a vowel.count.words = ["apple", "hello", "ice", "orange"], left = 0, right = 2
right as inclusive in the loop.s[0] or the last character.For "Easy" problems, focus on edge cases and clean code. Mentioning that you used a Set for vowels because it provides lookup shows that you think about efficiency even in simple tasks.
| Title | Difficulty | Topics | LeetCode |
|---|---|---|---|
| Find Words That Can Be Formed by Characters | Easy | Solve | |
| Count Common Words With One Occurrence | Easy | Solve | |
| Kth Distinct String in an Array | Easy | Solve | |
| Most Common Word | Easy | Solve | |
| Find the Most Common Response | Medium | Solve |