Determine whether a string matches with a given pattern
Given a string and a pattern, determine if the pattern matches with the string or not. The solution should not use any regex.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedGiven a string and a pattern, determine if the pattern matches with the string or not. The solution should not use any regex.
Write an efficient algorithm to check if a given string is k–palindrome or not. A string is k–palindrome if it becomes a palindrome on removing at most k characters from it.
The KMP Algorithm (or Knuth, Morris, and Pratt string searching algorithm) cleverly uses the previous comparison data. It can search for a pattern in linear time as it never re-compares a text symbol that has matched a pattern symbol.
Given a string, break it into all possible combinations of non-overlapping substrings enclosed within curly brackets.
Given a positive integer, find the minimum number possible by doing at-most k swap operations upon its digits.
The Longest Common Subsequence (LCS) problem is finding the longest subsequence present in given two sequences in the same order, i.e., find the 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.
This post will discuss how to find permutations of a string using iteration. The implementation should be able to handle strings with duplicate characters and don’t repeat the permutations.
Find all n–digit strictly increasing numbers where n varies from 1 to 9. If we process the number from left to right and every digit is greater than the preceding digit, we can say that the number is strictly increasing.
Write an efficient program to convert a given number to words.
Given a dictionary of words where each word follows a CamelCase notation, find all words in it that matches a given pattern of all uppercase characters.
Find the longest common prefix (LCP) in a given set of strings.
Given a huge set of words with duplicates present and a positive integer k, find the first k–maximum occurring words in it.