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

Subscribers:
92,300
Published on ● Video Link: https://www.youtube.com/watch?v=3vbBrl-LeDc



Duration: 54:24
1,189 views
54


iPad PDF Notes - https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/iPad%20PDF%20Notes/Leetcode-10-Regular%20Expression-Matching-Recursion%20Concepts%20%26%20Qns%20-%2018.pdf
Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A
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
C++/Java Code Link : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/Recursion/Regular%20Expression%20Matching.cpp
Leetcode Link : https://leetcode.com/problems/regular-expression-matching/

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!

My DP Concepts Playlist : https://youtu.be/7eLMOE1jnls
My Graph Concepts Playlist : https://youtu.be/5JGiZnr6B5w
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Subscribe to my channel : https://www.youtube.com/@codestorywithMIK
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK


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




Other Videos By codestorywithMIK


2024-03-20Task Scheduler | Using Greedy Only | No Heap | Leetcode 621 | codestorywithMIK
2024-03-19Merge In Between Linked Lists | Easy Straight Forward | AMAZON | Leetcode 1669 | codestorywithMIK
2024-03-18Task Scheduler | Easy Intuition | Using Heap | Leetcode 621 | codestorywithMIK
2024-03-17Minimum Deletions to Make String K-Special | 2 Simple Approaches | Leetcode 3085 | codestorywithMIK
2024-03-16Count Substrings Starting and Ending with Given Character | Leetcode 3084 | codestorywithMIK
2024-03-16Shortest Common Supersequence | 3 Approaches | DP On Strings |DP Concepts & Qns 20|codestorywithMIK
2024-03-15Contiguous Array | Using same Pattern Approach | Similar Problems | Leetcode 525
2024-03-15Trie VS Tree
2024-03-14Binary Subarrays With Sum | 2 Approaches | Detailed Explanation | Leetcode 930
2024-03-13Find the Pivot Integer | 5 Approaches | Easy Explanation | Leetcode 2485
2024-03-12Regular Expression Matching | Brute Force | Optimal | Recursion Concepts And Questions
2024-03-11Shortest Uncommon Substring in an Array | Detailed Intuition | Dry Run | Leetcode 3076 | Contest 388
2024-03-10Custom Sort String | 2 Approaches | Intuition | Meta | Leetcode 791
2024-03-10Maximum Strength of K Disjoint Subarrays | Recursion | Memoization | Leetcode 3077 | Contest 388
2024-03-09Intersection of Two Arrays | 4 Approaches | Leetcode 349
2024-03-08Minimum Common Value | 3 Approaches | Leetcode 2540
2024-03-07Count Elements With Maximum Frequency | One Pass | Two Pass | Leetcode 3005
2024-03-07Happy International Womenโ€™s Day, 2024 #womensday #codestorywithmik
2024-03-06Spend your time wisely #codestorywithMIK #motivation #hardwork
2024-03-04Minimum Length of String After Deleting Similar Ends | Simple Two Pointers | Leetcode 1750
2024-03-04Stay tuned - Life Changing Moment