Pattern Matching | Dynamic Programming | LCS

  Рет қаралды 9,607

Techdose

Techdose

Күн бұрын

This video explains an important dynamic programming video which is pattern matching.In this problem, we are given a pattern and a string and we are required to find if the pattern exists entirely as a subsequence in the given string.This problem is a variant of Longest Common Subsequence because finding just the LCS of pattern and string we can solve this problem.If LCS of pattern and string is equal to pattern then we pattern is matched and we need to return true otherwise false.If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
========================================================================
Join this channel to get access to perks:
/ @techdose4u
INSTAGRAM : / surya.pratap.k
SUPPORT OUR WORK: / techdose
LinkedIn: / surya-pratap-kahar-47b...
WEBSITE: techdose.co.in/
TELEGRAM Channel LINK: t.me/codewithT...
TELEGRAM Group LINK: t.me/joinchat/...
=======================================================================
USEFUL LINKS:-
Longest Common Subsequence (LCS): • Longest common subsequ...
Longest Repeating Subsequence: • Longest Repeating Subs...
Uncrossed Lines: • Uncrossed Lines | Dyna...
#dp #lcs #patternmatching

Пікірлер: 17
@abdqadr
@abdqadr 2 жыл бұрын
The fact that I could connect this problem to LCS before completing this video is amazing. Thank you tech dose for this wonderful playlist.
@Rahul-rp5hk
@Rahul-rp5hk 4 жыл бұрын
we can do it O(N) by using a pointer for P and for S
@avinashkumar3340
@avinashkumar3340 4 жыл бұрын
U r right. It's not a dp problem
@HarishAmarnath
@HarishAmarnath 4 жыл бұрын
Yes this is not dp problem
@utkarshgupta2909
@utkarshgupta2909 3 жыл бұрын
This was the reason , i came in comments
@abhinavmishra7617
@abhinavmishra7617 3 жыл бұрын
@@utkarshgupta2909 me too
@iamakifislam
@iamakifislam 3 жыл бұрын
The main thing is to learn the use of dynamic programming, not the solution of this problem. So hope this solving idea will help you to solve harder problem oneday.
@abhinavmishra7617
@abhinavmishra7617 3 жыл бұрын
nice explanation and linking to lcs is nice, but why not use two pointers and do it in one pass in O(n) ?
@parasjain9416
@parasjain9416 3 жыл бұрын
Dhanyawada
@techdose4u
@techdose4u 3 жыл бұрын
Shukriya :)
@yitingg7942
@yitingg7942 4 жыл бұрын
Can you also do one for lc 10 Regular Expression Matching please ?
@techdose4u
@techdose4u 4 жыл бұрын
It will come later in the series.
@yitingg7942
@yitingg7942 4 жыл бұрын
@@techdose4u Thanks a lot Sir!!
@TheSinashah
@TheSinashah 8 ай бұрын
Does anyone know the corresponding leetcode question number?
@niteshprajapat7918
@niteshprajapat7918 4 жыл бұрын
Hello Sir , please create next tutorial on Django. please sir
@written_syntax
@written_syntax 3 жыл бұрын
kzbin.info/www/bejne/i57Pm4uQft6jesU&ab_channel=CoreySchafer
@sudhanshugupta7387
@sudhanshugupta7387 3 жыл бұрын
We can do it like this if(Len(LCS(S1, S2)) == Len(S1)) return true; Else return false
Minimum edit distance | Dynamic programming | Backtracking
28:52
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 19 МЛН
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 30 МЛН
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 24 МЛН
DP 34. Wildcard Matching | Recursive to 1D Array Optimisation 🔥
43:52
Longest Repeating Subsequence | Dynamic Programming | LCS
19:59
How to win a argument
9:28
ajaxkmr (ajaxkmr1986)
Рет қаралды 717 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 21 МЛН
2 Years of C++ Programming
8:20
Zyger
Рет қаралды 7 М.
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 19 МЛН