Skip to content

Tag Archives: cpp-strings

The std::string::rfind is a string class member function that is used to search the last occurrence of any character in the string. If the character… Read More
Given two strings A and B, the task is to print all the non-repeating words out of the two given sentences. Examples:  Input: A = “I… Read More
The std::string::find_last_of is a string class member function which is used to find the index of last occurrence of any characters in a string. If… Read More
Given string str with uppercase characters and an integer K, the task is to find the length of the longest subsequence such that the frequency… Read More
Given a sentence in the form of string str, the task is to reverse each word of the given sentence in C++. Examples:   Input: str =… Read More
Given a string str, the task is to find the frequency of each character of a string using an unordered_map in C++ STL. Examples:  Input:… Read More
Given a string str consisting of lowercase English letters, the task is to find the longest palindromic string T which satisfies the following condition:  T… Read More
Given string str of size N, the task is to remove all the characters from the string that have odd frequencies. Examples:  Input: str =… Read More
Strings in C++ are used to store text or sequence of characters. In C++ strings can be stored in one of the two following ways:… Read More
Given a string of balanced expressions, find if it contains a redundant parenthesis or not. A set of parenthesis is redundant if the same sub-expression… Read More
Write a function to check whether two given strings are an Anagram of each other or not. An anagram of a string is another string… Read More
Given an array of characters arr[] of size N and an integer K. You have to insert the characters into an empty string one by… Read More
Given a string str, the task is to find the count of distinct characters in all the distinct sub-strings of the given string.Examples:   Input: str… Read More
This article shows how to convert a character array to a string in C++. The std::string in c++ has a lot of inbuilt functions which makes… Read More
Given a string S, remove duplicates in this string using STL in C++ Examples: Input: Geeks for geeks Output: Gefgkors Input: aaaaabbbbbb Output: ab Recommended:… Read More

Start Your Coding Journey Now!