Leetcode 30 Substring with Concatenation of All Words | Checkout SDE preparation Sheet link below
Here is the solution to "Substring with Concatenation of All Words" leetcode question. Hope you have a great time going through it.
🎉Question : leetcode.com/problems/substri...
🔥 𝕊𝕦𝕓𝕤𝕔𝕣𝕚𝕓𝕖𝕣 𝕨𝕚𝕥𝕙 𝟡 𝕠𝕗𝕗𝕖𝕣𝕤 𝕥𝕙𝕒𝕥 𝕣𝕖𝕛𝕖𝕔𝕥𝕖𝕕 𝔾𝕠𝕠𝕘𝕝𝕖 𝕃𝟞: • 9 Offers One Subscribe...
Check this out 🔽🔽🔽🔽
🔴 Coding Decoded SDE revision Sheet: bit.ly/3MG7d4D
🔥 Coding Decoded Binary Search TreeMap revision Sheet: bit.ly/3kUsiMa
🔥 Coding Decoded Trie revision Sheet: bit.ly/392YOJH
🔥 Coding Decoded Graph SDE sheet: bit.ly/3sfp8H4
🔥 Coding Decoded Stacks/Monotonic Stacks sheet: bit.ly/38tm0Ri
🔥 Coding Decoded Bit Manipulation sheet:bit.ly/3LkVNSe
🔥 Coding Decoded Backtracking SDE sheet: bit.ly/3FCzMwQ
🔥 Coding Decoded DP SDE sheet: bit.ly/38HgY3E
🔥 Coding Decoded Heaps SDE Sheet: bit.ly/3GQqBK7
🔥 Coding Decoded Maps/Sets SDE Sheet: bit.ly/3xfBemu
🔥 Coding Decoded Two Pointer SDE Sheet: bit.ly/3trJCwX
🔴 Connect with me here:
🔅My Linkedin(Sunchit Dudeja): bit.ly/3Qnk0L0
🔅Don't click: bit.ly/32XIXbU
🔅Insta: bit.ly/31TV5ur
🔅 Twitter: / sunchitdudeja
🔅Telegram Link for Chrome: telegram.me/codingdecoded
🔅Telegram Link for phone : t.me/codingdecoded
🔥🔥🔥🔥👇👇👇 For discussion/feedback/humour/doubts/new openings
Feel free to join discord / discord
👉 Solutions
Java➡️github.com/Sunchit/Coding-Dec...
C++➡️ github.com/Sunchit/Coding-Dec...
🔥🔥🔥🔥👇👇👇 For discussion/feedback/humour/doubts/new openings
Feel free to join discord / discord
🔴 Checkout the series: 🔥🔥🔥
👉 Leetcode Interview experiences and tips : • Playlist
👉 Leetcode contests: www.youtube.com?list=PLEI-q7w3s9gRwAEYzYkvVTsYHDi2-ffdL
👉 Leetcode System Design: • System Design
👉 Leetcode LinkedList: • Coding Decoded LinkedL...
👉 Leetcode Stack: • Coding Decoded Stack S...
👉 Leetcode Binary Search: • Coding Decoded BinaryS...
👉 Leetcode Tree: • Coding Decoded Tree Se...
👉 Leetcode Dyanmic Programming: • Coding Decoded Dynamic...
👉 Leetcode Hard: • LeetCode Hard Problems
👉 Leetcode Heap: • Coding Decoded Heap Se...
👉 Building Coding Aptitude: • Building Coding Aptitude
👉 Leetcode Map: • Coding Decoded Map Ser...
👉 Leetcode Two Pointer: • Coding Decoded Two Poi...
👉 Leetcode Backtracking: • Leetcode Backtracking ...
👉 Leetcode Graph Traversal: • Coding Decoded Graph T...
👉 Leetcode Trie: • Coding Decoded Trie Se...
👉 Leetcode Union Find: • Coding Decoded Union F...
👉 Leetcode BFS Graph Problems: • Coding Decoded BFS Ser...
👉 Leetcode Matrix Problems: • Coding Decoded Matrix ...
👉 Leetcode Easy: • Leetcode Easy Problems
👉 Leetcode Bit Manipulation: • Coding Decoded Bit Man...
🔥🔥🔥 Leetcode Monthly Contest Playlist
👉 Leetcode December 2021: www.youtube.com?list=PLEI-q7w3s9gRN3LsF0zArurVSz3HQyKZP
👉 Leetcode November 2021: www.youtube.com?list=PLEI-q7w3s9gT2IeinxSocuxyOKMB4H2zF
👉 Leetcode October 2021: www.youtube.com?list=PLEI-q7w3s9gTNU412xW8kV1xQ8upnrN0a
👉 Leetcode September 2021: www.youtube.com?list=PLEI-q7w3s9gTNU412xW8kV1xQ8upnrN0a
👉 Leetcode August2021: www.youtube.com?list=PLEI-q7w3s9gTEQxR2uR-g8DVhSTb2ZAx1
👉 Leetcode July 2021: www.youtube.com?list=PLEI-q7w3s9gRV3Bn3VO1rtgkA0wNkIm-y
👉 Leetcode June 2021: www.youtube.com?list=PLEI-q7w3s9gRGYr0jtVjqir5_8SpnQ6Og
👉 Leetcode May 2021: www.youtube.com?list=PLEI-q7w3s9gS8UNo22UA4O3_YjnQczyNp
👉 Leetcode April 2021: www.youtube.com?list=PLEI-q7w3s9gStjIegCW3i84AI9L2KjGhJ
Пікірлер: 69
Once you said, c++ codes are available as well, can you tell me where it is, I’m stuck in middle
Congratulations for the milestone..... your videos really helps a lot
@CodeWithSunchitDudeja
Жыл бұрын
Thank you so much 😀
Love the way you explain problem & it's approach
@CodeWithSunchitDudeja
Жыл бұрын
Thanks
Hi bro, thanks for helping me get consistent! I landed an offer at Samsung R&D Institute.. Keep going 🔥
@CodeWithSunchitDudeja
Жыл бұрын
Amazing! Can we please connect over linkedin..
@prempeacefulchannel
Жыл бұрын
@@CodeWithSunchitDudeja sure, I have sent you a connection request. My name is Prem R R
Tles for a newly added testcase : s = "aaaaaaa", words = ["a","a","a",...] len(s) and len(words) and len(words[i]) = max from constraint
The credit goes to you and your hardwork bhaiya!! And congratulationssss!!!
@CodeWithSunchitDudeja
Жыл бұрын
Thanks Sanjana
Soon 1 Million .. Keep up the hard work and Consistency is Key :)
@CodeWithSunchitDudeja
Жыл бұрын
Very soon...
wonderful solution and explanation, thank you
@CodeWithSunchitDudeja
Жыл бұрын
Thanks Santosh
nice solutions
Thank you for the solution and explanation! The link to join the discord channel fails with "Unable to Accept Invite"
Keep going.... All the very best Dont forget your tagline - "The Most Consistent DSA Channel" Hoping for the best....
@CodeWithSunchitDudeja
Жыл бұрын
Thanks a ton I love the tag line
You are an amazing teacher sir ❤
@CodeWithSunchitDudeja
27 күн бұрын
Thank you! 😃
I just subscribed recently.. Your contents are great.Dont know about your recent stuff. But i hope you have a Drawing tablet now😂. It would help greatly to you and for us too. ( i dont know about others but sometime i feel like what the heck is he writting. And one more thing : try to write/draw more as you explain. Some time i just have to playback just to listen carefully what did you just said.) And lastly i m not at commenting anything negative .There is no doubt your explanation.Its good.Just try to write more.👍🏻👍🏻
@CodeWithSunchitDudeja
Жыл бұрын
I consider this as positive feedback, appreciate it
Thanks for your efforts
@CodeWithSunchitDudeja
Жыл бұрын
It's my pleasure
how to find the substring indices starting from where ? how to do that?
Thanks.
Congratulations Buddy.
@CodeWithSunchitDudeja
Жыл бұрын
Thanks for the visit
what is the complexity of this solution
Congratulations sir ♥️
@CodeWithSunchitDudeja
Жыл бұрын
Thanks @bhuwanesh
Is it an optimal solution ??
Congratulations 🎉🎉
@CodeWithSunchitDudeja
Жыл бұрын
Thanks. :)
Congratulations ❤️🎉
@CodeWithSunchitDudeja
Жыл бұрын
Thanks Aman
Nice explanation
@CodeWithSunchitDudeja
Жыл бұрын
Keep watching
top notch content
@CodeWithSunchitDudeja
Жыл бұрын
Thanks :)
congrats
Thanks
@CodeWithSunchitDudeja
Жыл бұрын
Thanks Rushikesh
s.length()-len* wali cheez smjh nhi aayi
congratulations 🥳🥳
@CodeWithSunchitDudeja
Жыл бұрын
Thank you so much 😀
consider words=['t','t','t'....] and s="ttttt..." and words.len=s.len/2 , complexity would be O(N^2) How is solution getting accepted
@deepakr4546
Жыл бұрын
I tried something similar with DFS and list instead of map(instead of frequency I just deleted the element from the list. I don't think that would make a difference as even in map its O(N) to check if all words are covered) and I got a TLE for the mentioned test case.
@santoshvarma996
Жыл бұрын
@@deepakr4546 list is o(n) but map is o(1). also think of having duplicate words, in map they are counted as one where as in list they are counted twice increasing the TC
Super bro ❤
@CodeWithSunchitDudeja
9 ай бұрын
Thanks 🤗
Subscribed 😇
@CodeWithSunchitDudeja
Жыл бұрын
Thanks Sandeep
Solution starts from 4:07
solution is ok but i guess its not optimized code, we creating map again and again
@CodeWithSunchitDudeja
Жыл бұрын
I agree we can improve it
actual video starts at 4:10
This isnt O(N) solution
Congrats.. Thanks
@hymnish_you
Жыл бұрын
Sir, you are making videos consistently since I was struggling to get a good job. Thanks a lot! Your videos are an emotion to me.
@CodeWithSunchitDudeja
Жыл бұрын
Your comments are emotion to me 💚
c++ solution : leetcode.com/problems/substring-with-concatenation-of-all-words/discuss/2423767/Most-easiest-method-sliding-window
@CodeWithSunchitDudeja
Жыл бұрын
Java here: github.com/Sunchit/Coding-Decoded/blob/master/July2021/WordLadderII.java
@AmitKumar-um8rp
Жыл бұрын
@@raunakkumar6144 use long long or long long int everywhere . It will work.
dry run s = "barfoothefoobarman", words = ["foo","bar"] 0123456789 len= 3; map={foo:1,bar:1}; i=0; i
Thanks
@CodeWithSunchitDudeja
Жыл бұрын
Welcome