## Thue-Morse sequence

Thue–Morse sequence, or Prouhet–Thue–Morse sequence, is an infinite binary sequence of 0s and 1s. The sequence is obtained by starting with 0 and successively appending… Read More »

- Repeated Character Whose First Appearance is Leftmost
- Convert character array to string in C++
- Count substrings that contain all vowels | SET 2
- Find the longest string that can be made up of other strings from the array
- Minimum number of times A has to be repeated such that B is a substring of it
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Java program to check whether a string is a Palindrome
- Minimum number of adjacent swaps to convert a string into its given anagram
- Check for balanced parentheses in an expression | O(1) space | O(N^2) time complexity
- Check whether two strings contain same characters in same order
- Rearrange characters in a string such that no two adjacent are same using hashing
- Generate all permutations of a string that follow given constraints
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Program to generate all possible valid IP addresses from given string | Set 2
- Maximize the happiness of the groups on the Trip
- Implement a Dictionary using Trie
- InfyTQ 2019 : Find the position from where the parenthesis is not balanced
- Check if a string can be obtained by rotating another string d places
- Minimum rotations required to get the same String | Set-2
- C++ program to compare two Strings using Operator Overloading
- Count of substrings which contains a given character K times
- Append a digit in the end to make the number equal to the length of the remaining string
- Count the pairs of vowels in the given string
- Minimum number of sub-strings of a string such that all are power of 5
- Reverse individual words with O(1) extra space
- Find uncommon characters of the two strings | Set 2
- Persistent Trie | Set 1 (Introduction)
- Total number of odd length palindrome sub-sequence around each centre
- Largest substring with same Characters
- Optimally accommodate 0s and 1s from a Binary String into K buckets

Thue–Morse sequence, or Prouhet–Thue–Morse sequence, is an infinite binary sequence of 0s and 1s. The sequence is obtained by starting with 0 and successively appending… Read More »

We are given a string, we need check whether the first and last characters of the string str are equal or not. Case sensitivity is… Read More »

Given a string str and the task is to count palindrome words present in the string str. Examples: Input : Madam Arora teaches malayalam Output… Read More »

Given N(very large), task if to print the largest palindromic number obtained by permuting the digits of N. If it is not possible to make… Read More »

Given a String str and the task is to check sum of ASCII value of all characters is a perfect square or not. Examples :… Read More »

Given a string S, we need to find reciprocal of it. The reciprocal of the letter is found by finding the difference between the position… Read More »

Given a bracket sequence or in other words a string S of length n, consisting of characters ‘(‘ and ‘)’. Find length of the maximum… Read More »

Given a string S. Count number of substrings in which each character occurs at most k times. Assume that the string consists of only lowercase… Read More »

Two strings are given, we need to find whether we can form second string by swapping the character of the first string. Examples: Input :… Read More »

Given a number K and a string S, We have to Find the lexicographically smallest string str of length K such that it’s set of… Read More »

Given a string s of lowercase letters, we need to remove consecutive vowels from the string Note : Sentence should not contain two consecutive vowels… Read More »

Given two integer number n and d. The task is to find the number between 0 to n which contain the specific digit d. Examples:… Read More »

Given n directory paths, we need to write a program to find longest common directory path. Examples: Input : 3 “/home/User/Desktop/gfg/test” “/home/User/Desktop/gfg/file” “/home/User/Desktop/geeks/folders” Output :… Read More »

Given a string S, we need to write a program to check if it is possible to construct the given string S by performing any… Read More »

Given a password entered by the user, check its strength and suggest some password if it is not strong. Criteria for strong password is as… Read More »