Print all N-digit binary numbers with k-bits set where k ranges from 1 to N. Numbers with same number of bits set should be printed together and in ascending order.
Given a positive number n, find all strings of length n containing balanced parentheses.
Lexicographically minimal string rotation or lexicographically least circular substring is the problem of finding the rotation of a string possessing the lowest lexicographical order of all such rotations.
Given a string sorted in ascending order, find all lexicographically next permutations of it.
In this post, we will see how to find all permutations of a string containing all distinct characters in C++.
Given a string, find the longest substring of given string containing distinct characters.
Find all substrings of a string that contains all characters of another string. In other words, find all substrings of first string that are anagrams of second string.
Given a string, find all palindromic permutations of it.
Given a string and a positive number k, find the longest substring of given string containing k distinct characters. If k is more than number of distinct characters in the string, return the whole string.
In this post, we will see how to validate an IP address (IPv4) in C++. A valid IPv4 address must be in the form of xxx.xxx.xxx.xxx, where xxx is a number from 0-255.
Run length encoding (RLE) is a very simple form of lossless data compression which runs on sequences having same value occurring many consecutive times and it encode the sequence to store only a single value and its count.
Given a line of text, reverse the text without reversing the individual words.