ProDeveloperTutorialonJanuary 19, 2025 Dynamic Programming: Print Shortest Common Supersequence Problem Statement: You are given 2 strings, you need to print shortest common supersequence. A super sequence is a string that has both string…
ProDeveloperTutorialonJanuary 19, 2025 Dynamic Programming: Length of Shortest Common Supersequence Problem Statement: You are given 2 strings, you need to return the length of shortest common supersequence. A super sequence is a string that…
ProDeveloperTutorialonJanuary 19, 2025 Dynamic Programming: Print Longest Common Sub-sequence Problem Statement: You are given 2 strings S1 and S2. You need to print the Longest Common Substring. Example Solution We need to first goto…
ProDeveloperTutorialonJanuary 19, 2025 Dynamic Programming: Longest Common Subsequence Problem Statement: You are given 2 strings, you need to find the longest common subsequece. Example Input: Str 1: abfgkl Str 2: abcdel Output:…
ProDeveloperTutorialonJanuary 19, 2025 Dynamic Programming: Minimum Number of swaps to make array increasing Problem Statement: You are given 2 arrays, you are allowed to swap arr1[i] and arr2[i]. Elements from the same index. You need to return…
ProDeveloperTutorialonJanuary 19, 2025 Dynamic Programming: Count the number of subset with a given difference Problem Statement: You are given with an array and a difference. You need to count the number of subsets with a given difference. Example…
ProDeveloperTutorialonJanuary 19, 2025 Dynamic Programming: Target Sum Problem Statement: You are given an array and a sum, you need to either add + or – to all the array elements, so that the sum should be…
ProDeveloperTutorialonJanuary 19, 2025 Dynamic Programming: Minimum subset difference Problem Statement: You are given an array, you need to divide into two subsets that the difference between their sum is minimum. Example…
ProDeveloperTutorialonJanuary 19, 2025 Dynamic Programming: Count of subset sum with a given sum Problem Statement: You are given an array and a sum,you need to find the number of subsets with that sum. Example Input: arr[] = {1, 2, 3, 3},…
ProDeveloperTutorialonJanuary 19, 2025 Get the sum by deleting elements from the array Problem Statement: You are given an array, you need to delete the element at nums[i] to earn num[i]. But after every delete, you have to…