Mail - Dubey, Suryansh (Contract X HackerRank Question - Vowels X Chackerrank.com/test/eifsidn6q35/questions/1rtpsisre11
Posted: Thu May 05, 2022 12:48 pm
solve in java 8 in 30 minutes
solve in java 8
i dont have full question screenshot you get on hackerrank full question please provide solution
Mail - Dubey, Suryansh (Contract X HackerRank Question - Vowels X Chackerrank.com/test/eifsidn6q35/questions/1rtpsisre11 BETA Can't read the text? Switch theme 3. Vowels Given a string array that contains n elements, each composed of lowercase English letters, and q queries, each query of the format /-r, for each query, determine how many strings starting from index / and ending at index r have vowels as the first and last character. Vowels are in (a,e,i,o,u). Example strArr=['aba', 'bcb', 'ece', 'aa', 'e'] queries = [1-3,2-5','2-2"] These strings represent two dash delimited integers / and r, the start and end indices of the interval, inclusive. Using 1-based indexing in the string array, the interval 1-3 contains two strings that start and end with a vowel: 'aba' and 'ece'. The interval 2-5 also has three. The third interval, from 2-2, the only element in the interval, 'bcb' does not begin and end with a vowel. The 52m left O ALL Ⓡ 1 2 3 4 5 C# A Autocomplete Disabled V Ⓒ Info 44 } 45 46 } 47 foreach( string qry in query) 48 { 49 count=0; 50 51 string[] IrStringArray= qry.Split('-'); 1= Int16.Parse(lrStringArray [0])-1; r= Int16.Parse(lrStringArray[1])-1; 52 53 Run Code Test Results Custom Input Compiled successfully. All available test cases passed Test case 0 Input (stdin) Test case 1 1 5 2 aab 3 Test case 2 8 a bcd 4 5 awe Test case 38 O: Ⓒ Line: 68 Col: 38 Run Tests Submit Run as Custom Input | Download ✓
solve in java 8
i dont have full question screenshot you get on hackerrank full question please provide solution
Mail - Dubey, Suryansh (Contract X HackerRank Question - Vowels X Chackerrank.com/test/eifsidn6q35/questions/1rtpsisre11 BETA Can't read the text? Switch theme 3. Vowels Given a string array that contains n elements, each composed of lowercase English letters, and q queries, each query of the format /-r, for each query, determine how many strings starting from index / and ending at index r have vowels as the first and last character. Vowels are in (a,e,i,o,u). Example strArr=['aba', 'bcb', 'ece', 'aa', 'e'] queries = [1-3,2-5','2-2"] These strings represent two dash delimited integers / and r, the start and end indices of the interval, inclusive. Using 1-based indexing in the string array, the interval 1-3 contains two strings that start and end with a vowel: 'aba' and 'ece'. The interval 2-5 also has three. The third interval, from 2-2, the only element in the interval, 'bcb' does not begin and end with a vowel. The 52m left O ALL Ⓡ 1 2 3 4 5 C# A Autocomplete Disabled V Ⓒ Info 44 } 45 46 } 47 foreach( string qry in query) 48 { 49 count=0; 50 51 string[] IrStringArray= qry.Split('-'); 1= Int16.Parse(lrStringArray [0])-1; r= Int16.Parse(lrStringArray[1])-1; 52 53 Run Code Test Results Custom Input Compiled successfully. All available test cases passed Test case 0 Input (stdin) Test case 1 1 5 2 aab 3 Test case 2 8 a bcd 4 5 awe Test case 38 O: Ⓒ Line: 68 Col: 38 Run Tests Submit Run as Custom Input | Download ✓