Given a string, remove adjacent duplicates characters from it. In other words, remove all consecutive same characters except one.
Given a string and a pattern, determine if the pattern matches with the string or not. The solution should not use any regex.
A string is K-Palindrome if it becomes a palindrome on removing at most k characters from it. Write an algorithm to check if a given string is K-Palindrome or not.
In this post, we will implement KMP Algorithm in C, C++ and Java programming language.
Given a string, break it into all possible combinations of non-overlapping substrings enclosed within curly brackets.
Given a positive integer, find minimum number possible by doing at-most K swap operations upon its digits.
The longest common subsequence (LCS) problem is the problem of finding the longest subsequence that is present in given two sequences in the same order. i.e. find a longest sequence which can be obtained from the first original sequence by deleting some items, and from the second original sequence by deleting other items.
In this post, we will discuss how to find permutations of a string using iteration.
Find all N-digit strictly increasing numbers where N varies from [1 to 9]. If we process the number from left to right and for every pair of adjacent digits, if every digit is greater than the preceding digit, we can say that the digits are strictly increasing.
Wildcard Pattern Matching: Given a string and a pattern containing wildcard characters i.e. ‘*’ and ‘?’, where ‘?’ can match to any single character in input string and ‘*’ can match to any number of characters including zero characters, design an efficient algorithm to find if the pattern matches with the complete input string or …
In this post, we will see how to reverse a string in Java in 10 different ways. For example, reverse of “Techie Delight” is “thgileD eihceT”.
In this post, we will discuss about std::prev_permutation which can be used to find the lexicographically smaller permutations of a string.