SPRINTO Hiring Off-Campus | Count Vowel Strings in Range | Online Assessment (2024)
Question · Posted Jun 2026
Problem Statement You are given a string array words and two integers lo and hi. A string is called a vowel string if: Its first character is a vowel (a, e, i, o, u). Its last character is also a vowel (a, e, i, o, u). Your task is to count the number of vowel strings present in the subarray words[lo...hi] (inclusive). Return the total count of such strings. Example 1 Input words = ["are","amy","u"] lo = 0 hi = ...
The full answer & interview discussion are available to premium members.
Log in Create a free account