Longest Common Subsequence (2 Strings) - Dynamic Programming & Competing Subproblems
Code & Problem Statement @ https://b2bswe.co/longest-common-subsequence
Free 5-Day Mini-Course: https://backtobackswe.com
Try Our Full Platform: https://backtobackswe.com/pricing
📹 Intuitive Video Explanations
🏃 Run Code As You Learn
💾 Save Progress
❓New Unseen Questions
🔎 Get All Solutions
Subscribe To Live Tech Offers: https://offerfeed.io
Join Our Coaching Service: https://backtobackswe.com/coaching
Question: You are given 2 strings. Return the length of the longest subsequence that the 2 strings share.
Complexities
n = s1.length()
m = s2.length()
Time: O( nm )
We can upper bound time by the number of subproblems that we are going to solve.
Space: O( nm )
We upper bound space by the number of subproblems we will story answers to. Whether we do (n + 1)(m + 1) or (n)(m) doesn't matter asymptotically.
++++++++++++++++++++++++++++++++++++++++++++++++++
HackerRank: https://www.youtube.com/channel/UCOf7UPMHBjAavgD0Qw5q5ww
Tuschar Roy: https://www.youtube.com/user/tusharroy2525
GeeksForGeeks: https://www.youtube.com/channel/UC0RhatS1pyxInC00YKjjBqQ
Jarvis Johnson: https://www.youtube.com/user/VSympathyV
Success In Tech: https://www.youtube.com/channel/UC-vYrOAmtrx9sBzJAf3x_xw
Видео Longest Common Subsequence (2 Strings) - Dynamic Programming & Competing Subproblems канала Back To Back SWE
Free 5-Day Mini-Course: https://backtobackswe.com
Try Our Full Platform: https://backtobackswe.com/pricing
📹 Intuitive Video Explanations
🏃 Run Code As You Learn
💾 Save Progress
❓New Unseen Questions
🔎 Get All Solutions
Subscribe To Live Tech Offers: https://offerfeed.io
Join Our Coaching Service: https://backtobackswe.com/coaching
Question: You are given 2 strings. Return the length of the longest subsequence that the 2 strings share.
Complexities
n = s1.length()
m = s2.length()
Time: O( nm )
We can upper bound time by the number of subproblems that we are going to solve.
Space: O( nm )
We upper bound space by the number of subproblems we will story answers to. Whether we do (n + 1)(m + 1) or (n)(m) doesn't matter asymptotically.
++++++++++++++++++++++++++++++++++++++++++++++++++
HackerRank: https://www.youtube.com/channel/UCOf7UPMHBjAavgD0Qw5q5ww
Tuschar Roy: https://www.youtube.com/user/tusharroy2525
GeeksForGeeks: https://www.youtube.com/channel/UC0RhatS1pyxInC00YKjjBqQ
Jarvis Johnson: https://www.youtube.com/user/VSympathyV
Success In Tech: https://www.youtube.com/channel/UC-vYrOAmtrx9sBzJAf3x_xw
Видео Longest Common Subsequence (2 Strings) - Dynamic Programming & Competing Subproblems канала Back To Back SWE
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Find The Longest Increasing Subsequence - Dynamic Programming FundamentalsEdit Distance Between 2 Strings - The Levenshtein Distance ("Edit Distance" on LeetCode)Add Two Numbers Without The "+" Sign (Bit Shifting Basics)Total Occurrences Of K In A Sorted Array (Facebook Software Engineering Interview Question)Longest Common Subsequence - Recursive and Iterative DP (LeetCode Day 26)Algorithms Lecture 19: Dynamic Programming, Longest Common Subsequence and Longest Common SubstringSearch A 2D Sorted Matrix - Fundamentals of Search Space ReductionMax Contiguous Subarray Sum - Cubic Time To Kadane's Algorithm ("Maximum Subarray" on LeetCode)4.9 Longest Common Subsequence (LCS) - Recursion and Dynamic ProgrammingImplement A Binary Heap - An Efficient Implementation of The Priority Queue ADT (Abstract Data Type)Generate All Strings With n Matched Parentheses - Backtracking ("Generate Parentheses" on LeetCode)The 0/1 Knapsack Problem (Demystifying Dynamic Programming)Minimum Window Substring: Utilizing Two Pointers & Tracking Character Mappings With A HashtableEgg Dropping Problem: Dynamic Programming Fundamentals & Understanding Subproblem DecompositionLeetCode 5. Longest Palindromic Substring (Algorithm Explained)19. Dynamic Programming I: Fibonacci, Shortest PathsDijkstra's Algorithm vs Prim's AlgorithmDifference between SubArray, SubSequence and SubSet