Longest Palindromic Subsequence using Dynamic Programming
The Longest Palindromic Subsequence (LPS) problem is finding the longest subsequences of a string that is also a palindrome.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedThe Longest Palindromic Subsequence (LPS) problem is finding the longest subsequences of a string that is also a palindrome.
The longest common substring problem is the problem of finding the longest string (or strings) that is a substring (or are substrings) of two strings.
Given two sequences, print all the possible longest common subsequences present in them.
This post covers a space-optimized function to find the length of the Longest Common Subsequence (LCS) problem.
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.
Given a string, find all combinations of non-overlapping substrings of it. The solution should use parenthesis to split the string into non-overlapping substrings.
Given a positive number n, efficiently generate binary numbers between 1 and n using the queue data structure in linear time.
Write a program to print all n–digit binary numbers with k–bits set where k ranges from 1 to n. The numbers with the same number of bits set should be printed together in ascending order.
Given a positive number n, find all strings of length n containing balanced parentheses.
The lexicographically minimal string rotation (or lexicographically least circular substring) is the problem of finding a string’s rotation possessing the lowest lexicographical order among all possible rotations.
Given a string sorted in ascending order, find all lexicographically next permutations of it. The words are arranged in the same order in the lexicographic order as they are presumed to appear in a dictionary.
This post will find all permutations of a string containing all distinct characters in C++. For example, the string ABC has 6 permutations, i.e., ABC, ACB, BAC, BCA, CBA, CAB.