DP with Strings
Some of the most exciting questions on strings reach exponential run times if solved by a usual brute force method. This is where DP comes in to help us find a better optimal solution. This section is a carefully curated list of problems involving DP on strings.
By Soumya Agrawal
● Published At Oct 2021
In this blog, we will be restoring the IP address problems by using different approaches. ... Keep reading ..
Lexicographically smallest anagram of given string in range [L, R] for Q queries
By Nishant Rana
● Published At Feb 2022
This blog will cover the question to find the lexicographically smallest anagram of the given string in the range [L, R] for Q queries ... Keep reading ..
Minimum Characters Require to Remove from Binary String to Sort it in Ascending Order
By Ujjawal Gupta
● Published At Jan 2022
In this blog, we will learn to solve a problem based on Dynamic Programming. We will discuss an efficient approach to solve the problem.... Keep reading ..
Find the Minimum Insertions in the Given String to Form a Palindrome
By Ujjawal Gupta
● Published At Jan 2022
In this blog, we will learn to solve a problem based on Dynamic Programming. Here, we will discuss two approaches based on recursion and dynamic programming. ... Keep reading ..
Minimize Cost to Convert all ‘0’s to ‘1’s with Cost of Converting ‘0’s Group be K and that of ‘1’ be K / 3
By Sujal Modanwal
● Published At Jan 2022
The task is to find the minimum cost to convert all the ‘0’s of the given binary string to ‘1’s.... Keep reading ..
Minimum Count of Prefixes and Suffixes of a String Required to Form Given String
By Saksham Gupta
● Published At Jan 2022
In this blog, we will see how we can solve the famous problem ‘minimum count of prefixes and suffixes of a string required to form given string’. ... Keep reading ..
Decode ways
By Shreya Deep
● Published At Nov 2021
In this article we’ll learn in how many ways we can decode a given text.... Keep reading ..
Minimum and Maximum values of an expression with * and +
By Yukti Kumari
● Published At Nov 2021
This article explains the solution to the problem of finding the minimum and maximum values of an expression with * and + ... Keep reading ..