Balancing Consonants and Vowels Ratio | GFG POTD| GeeksForGeeks| Problem of the Day | Easy Solution
Автор: Codey
Загружено: 2025-08-01
Просмотров: 81
In this question I have solved gfg problem of the day using very simple and easy to understand approach.
problem link-https://www.geeksforgeeks.org/problem...
-----------------------------------------------------------------------------------------------------------------------
Balancing Consonants and Vowels Ratio
You are given an array of strings arr[], where each arr[i] consists of lowercase english alphabets. You need to find the number of balanced strings in arr[] which can be formed by concatinating one or more contiguous strings of arr[].
A balanced string contains the equal number of vowels and consonants.
Examples:
Input: arr[] = ["aeio", "aa", "bc", "ot", "cdbd"]
Output: 4
Explanation: arr[0..4], arr[1..2], arr[1..3], arr[3..3] are the balanced substrings with equal consonants and vowels.
Input: arr[] = ["ab", "be"]
Output: 3
Explanation: arr[0..0], arr[0..1], arr[1..1] are the balanced substrings with equal consonants and vowels.
Input: arr[] = ["tz", "gfg", "ae"]
Output: 0
Explanation: There is no such balanced substring present in arr[] with equal consonants and vowels.
-------------------------------------------------------------------------------------------------------------------
***************************************************************************
#dsa #programming #gfg #gfgpotd #problemsolving #coding #softwareengineer #faang #competitiveprogramming #dsasheet #interviewpreparation #coding #gfg #geeksforgeeks #leetcode #potd #coding #india #easyexplaination #leetcode #leetcodechallenge #leetcodedailychallenge
#java #codinginterviews #problemoftheday #algorithm #datastructures #hindi #bitmanipulation #bits #competitiveprogramming
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: