Interleaving String | Leetcode 97 | Live coding session | DP

  Рет қаралды 2,928

Coding Decoded

Coding Decoded

Күн бұрын

Пікірлер: 15
@huaqian3654
@huaqian3654 2 жыл бұрын
Thank you! This is the most clear explanation I have heard! Great job!
@abhishek__anand__
@abhishek__anand__ Жыл бұрын
Nice Explanation
@sagarbora7768
@sagarbora7768 2 жыл бұрын
Thanks Sunchit! You made it easy!
@parikabajaj7756
@parikabajaj7756 3 жыл бұрын
Great solution @Coding-decoded
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja 3 жыл бұрын
Thanks Parika
@ditu-kunalsarda6863
@ditu-kunalsarda6863 3 жыл бұрын
I was trying by using 2stacks😅 and poping common substrings, your looks better
@ayushiagarwal6996
@ayushiagarwal6996 3 жыл бұрын
I just had a thought if we could append both the strings into a single string and then maintain two pointers l and r that keeps a check if characters are matched and accordingly increment the pointer.
@elektrogrammer
@elektrogrammer 3 жыл бұрын
This can be done without appending the strings and running pointers over each of the strings, in all 3. If we check character by character and face a condition where the character in s3 matches character at both s1 and s2, then we have to check both cases like a tree wherein we consider s1 in left and s2 in right. I tried this method but it gives TLE on leetcode.
@ayushiagarwal6996
@ayushiagarwal6996 3 жыл бұрын
@@elektrogrammer Yes because it will have a time complexity of O(n3) and will fail for large strings as input.
@ayushiagarwal6996
@ayushiagarwal6996 3 жыл бұрын
I think now I understood why my approach will not generate an answer for each case. One such example could be ab15 and abb379 and s3 is abbab13579
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja 3 жыл бұрын
@@ayushiagarwal6996 Yes, this is what I tried to explain in the initial case as well.
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja 3 жыл бұрын
Nice question 👌
@shishir-kon
@shishir-kon 3 жыл бұрын
Hi. The part in the video 9:30~13:30 is repeating (9:30~11:30 + 11:30~13:30). I think you haven't edited it out. You can edit part of the video in KZbin studio editor. Hope it helps.
@evkumar71
@evkumar71 3 жыл бұрын
It's a bit difficult to understand the handwriting. Better tool would be helpful.
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja 3 жыл бұрын
Feedback taken will try to improve, thanks
Max Area of Island | Leetcode 695 | Live Coding session
9:33
Coding Decoded
Рет қаралды 1,8 М.
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 61 МЛН
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 4,4 МЛН
String Interleaving Dynamic Programming
7:47
Tushar Roy - Coding Made Simple
Рет қаралды 93 М.
you will never ask about pointers again after watching this video
8:03
Leetcode - Interleaving String (Python)
10:58
Timothy H Chang
Рет қаралды 2,7 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 28 МЛН
Interleaving String | Dynamic Programming | Leetcode #97
30:30
541 Leetcode problems are NOT enough.
7:12
Sahil & Sarra
Рет қаралды 160 М.
Interleaving Strings | Dynamic Programming | Coding Interview Question
23:05
5 Math Skills Every Programmer Needs
9:08
Sahil & Sarra
Рет қаралды 1,1 МЛН
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,7 МЛН
The Art of Code - Dylan Beattie
1:00:49
NDC Conferences
Рет қаралды 4,7 МЛН
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 61 МЛН