Tagged: strings

Count Number of Vowels and Consonants in the String

“Count Number of Vowels and Consonants in the String ” is a basic problem of string data structure. Here, we are given a string of length ‘n’ and our task is to count the number of vowels and consonants present in the string. Example: Input: Help12me!@study#bro Output: The number of...

Count Frequency of Character in String

“Count Frequency of Character in String” is a basic problem of string data structure. Here, we are given a string of length ‘n’ and our task is to write a program to count how many times a particular character occurs in the string. Example: Input:  Enter a string: abcdrfedsdfddgr Enter...

Reverse a String

“Reverse a String” is a basic operation which can be applied over string. Here, we are given a string of length ‘n’ and our task is to write a program to reverse the given string without using in-built function.  Example: INPUT: ABCDEFGH OUTPUT: HGFEDCBA There are multiple ways to reverse a...

blank

Check for balanced parentheses

“Check for balanced parentheses” is one of an ideal application of stack data structure. Here, we have given a parentheses string and our aim is to check whether the given string is balanced parentheses string or not.  Balanced parentheses strings are those strings who have closing parentheses like }, ], ) for each...