Pattern Matching | Dynamic Programming | LCS

preview_player
Показать описание
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:

=======================================================================

USEFUL LINKS:-

#dp #lcs #patternmatching
Рекомендации по теме
Комментарии
Автор

The fact that I could connect this problem to LCS before completing this video is amazing. Thank you tech dose for this wonderful playlist.

abdqadr
Автор

we can do it O(N) by using a pointer for P and for S

Rahul-rphk
Автор

nice explanation and linking to lcs is nice, but why not use two pointers and do it in one pass in O(n) ?

abhinavmishra
Автор

Does anyone know the corresponding leetcode question number?

TheSinashah
Автор

Can you also do one for lc 10 Regular Expression Matching   please ?

yitingg
Автор

Hello Sir, please create next tutorial on Django. please sir

niteshprajapat
Автор

We can do it like this if(Len(LCS(S1, S2)) == Len(S1)) return true;
Else return false

sudhanshugupta
visit shbcf.ru