Regular Expression Matching | Brute Force | Optimal | Recursion Concepts And Questions

preview_player
Показать описание
This is the 18th video of our playlist "Recursion Concepts And Questions". Find the Details below :

Video Name : Regular Expression Matching | Brute Force | Optimal | Recursion Concepts And Questions
Video # : 18

NOTE : We will also optimise the code by memoization (DP)

🔍 Unraveling Recursion: A Journey into the Depths of Code

🎥 Welcome to the 18th Video of my Recursion Playlist! 🚀 In this enlightening video, we will solve another very famous recursion problem "Regular Expression Matching". We will start with a Simple story as well as Tree Diagram for understanding the problem and then we will be Converting Story to code and writing the recursive code for the problem and I will also be explaining the Time and Space Complexity of the code 🌐.

🔍 What's Inside?

🔗 Simple story understanding with Tree Diagram

🔗 Converting Story to code and writing the recursive code for Regular Expression Matching problem

🔗 Explanation of Time and Space Complexity of the code

👩‍💻 Who Should Watch?

This playlist is for everyone but best suited for Freshers who are new to Recursion.

🚀 Embark on the Recursive Adventure Now!

Approach Summary :
Approach-1 -
The solution uses recursion to check if a given text matches a pattern with wildcard characters '' and '.'. It handles base cases, matches the first character, and deals with '' by exploring two possibilities. The time complexity is exponential, and the space complexity is O(m), where m is the length of the pattern. While correct, this approach may benefit from optimization techniques for better efficiency.
Approach-2 -
In this approach, we will use i and j pointers in order to avoid substring call multiple times and we also memoize the code for optimal solution.

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝

✨ Timelines✨
00:00 - Introduction
04:08 - Though process from examples
25:13 - Tree Diagram
31:07 - Story To Code
38:42 - Time & Space Complexity
41:22 - Coding Story To Code
46:51 - Optimisation
48:39 - Coding Optimal Approach

#codestorywithMIK
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #2024 #newyear #RecursionExplained #CodingJourney #Programming101 #TechTalks #AlgorithmMastery #Recursion #Programming #Algorithm #Code #ComputerScience #SoftwareDevelopment #CodingTips #RecursiveFunctions #TechExplained #ProgrammingConcepts #CodeTutorial #LearnToCode #TechEducation #DeveloperCommunity #RecursiveThinking #ProgrammingLogic #ProblemSolving #AlgorithmDesign #CSEducation
Рекомендации по теме
Комментарии
Автор

Few days back I was struggling with this problem, thanks a lot for coming up with the solution that too with so much depth, I really needed this.

UEEAngiraDas
Автор

Your teaching skills are just awesome ❤❤

AdityaRaj-xevj
Автор

How are you so good.
I remember I struggled with this problem a lot. The indepth points you share in your videos is a gold mine

DevOpskagyaan
Автор

Itna mazaa aaya na bhai thank you so much!

Divyansh-nh
Автор

16:40, It should be true, just like the way a*ab is true, b*ab will also be true.

deathigniter
Автор

You are the best
I was waiting for this.
Is the Recursion Concepts playlist complete now ?

aws_handles
Автор

At 16:40 minutes, answer of "ab" and "b*ab" must be True, because b* can be matched with " " or "b" or "bb" and so on.
* means 0 or more of the preceding element,
Also 3rd test case of the leetcode of the same problem is "aab" and "c*a*b" and answer for which is true, clearly stating that "c*" means " " or "c" or "cc" and so on.

Mohit_Yadav_
Автор

best explanation!! thank you so much <3

AmitSaha_
Автор

Aj ka gfg potd - generalized fibonacci number 🤯(hard) ..kahi par acha explanation nehi mila..
Ho sake to iska ek detailed video bana dena pls.

jatakchatterjee
Автор

Thank you dada
Can you please do maximum index of gfg please? And comparator video of java?

JagannathDebGunin
Автор

How can we check directly the p[1] as it may be out of bound mean what is p length is 1? Im getting confused in it ??

Ramneet
Автор

bhaiya could u plzz update more question videos

mohddanish
Автор

Bhaiya please read my comment on previous videos i want to talk to you

yashvalecha
Автор

public boolean isMatch(String s, String p){
boolean[][]dp=new

for(int i=s.length()-1;i>=0;i--)
for(int j=p.length()-1;j>=0;j--){
boolean (i)||p.charAt(j)=='.'));


}else{
dp[i][j]=match&&dp[i++][j+1];
}
}
return dp[0][0];
}

dayashankarlakhotia