Thank you! This is the most clear explanation I have heard! Great job!
@abhishek__anand__ Жыл бұрын
Nice Explanation
@sagarbora77682 жыл бұрын
Thanks Sunchit! You made it easy!
@parikabajaj77563 жыл бұрын
Great solution @Coding-decoded
@CodeWithSunchitDudeja3 жыл бұрын
Thanks Parika
@ditu-kunalsarda68633 жыл бұрын
I was trying by using 2stacks😅 and poping common substrings, your looks better
@ayushiagarwal69963 жыл бұрын
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.
@elektrogrammer3 жыл бұрын
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.
@ayushiagarwal69963 жыл бұрын
@@elektrogrammer Yes because it will have a time complexity of O(n3) and will fail for large strings as input.
@ayushiagarwal69963 жыл бұрын
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
@CodeWithSunchitDudeja3 жыл бұрын
@@ayushiagarwal6996 Yes, this is what I tried to explain in the initial case as well.
@CodeWithSunchitDudeja3 жыл бұрын
Nice question 👌
@shishir-kon3 жыл бұрын
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.
@evkumar713 жыл бұрын
It's a bit difficult to understand the handwriting. Better tool would be helpful.