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

  • @herculean6748
    @herculean6748 Жыл бұрын

    Once you said, c++ codes are available as well, can you tell me where it is, I’m stuck in middle

  • @shvmsh20
    @shvmsh20 Жыл бұрын

    Congratulations for the milestone..... your videos really helps a lot

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thank you so much 😀

  • @siddhantsipoliya6966
    @siddhantsipoliya6966 Жыл бұрын

    Love the way you explain problem & it's approach

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks

  • @prempeacefulchannel
    @prempeacefulchannel Жыл бұрын

    Hi bro, thanks for helping me get consistent! I landed an offer at Samsung R&D Institute.. Keep going 🔥

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Amazing! Can we please connect over linkedin..

  • @prempeacefulchannel

    @prempeacefulchannel

    Жыл бұрын

    @@CodeWithSunchitDudeja sure, I have sent you a connection request. My name is Prem R R

  • @ashutoshbind8068
    @ashutoshbind8068 Жыл бұрын

    Tles for a newly added testcase : s = "aaaaaaa", words = ["a","a","a",...] len(s) and len(words) and len(words[i]) = max from constraint

  • @sanjana8267
    @sanjana8267 Жыл бұрын

    The credit goes to you and your hardwork bhaiya!! And congratulationssss!!!

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks Sanjana

  • @vineetsaini8399
    @vineetsaini8399 Жыл бұрын

    Soon 1 Million .. Keep up the hard work and Consistency is Key :)

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Very soon...

  • @santoshvarma996
    @santoshvarma996 Жыл бұрын

    wonderful solution and explanation, thank you

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks Santosh

  • @pavniujla654
    @pavniujla654 Жыл бұрын

    nice solutions

  • @kshitijmathur1994
    @kshitijmathur1994 Жыл бұрын

    Thank you for the solution and explanation! The link to join the discord channel fails with "Unable to Accept Invite"

  • @deepankarjain4668
    @deepankarjain4668 Жыл бұрын

    Keep going.... All the very best Dont forget your tagline - "The Most Consistent DSA Channel" Hoping for the best....

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks a ton I love the tag line

  • @kirank3368
    @kirank336827 күн бұрын

    You are an amazing teacher sir ❤

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    27 күн бұрын

    Thank you! 😃

  • @user-hb5wh2ny9v
    @user-hb5wh2ny9v Жыл бұрын

    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

    @CodeWithSunchitDudeja

    Жыл бұрын

    I consider this as positive feedback, appreciate it

  • @batman28996
    @batman28996 Жыл бұрын

    Thanks for your efforts

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    It's my pleasure

  • @easyvedicmaths886
    @easyvedicmaths8862 ай бұрын

    how to find the substring indices starting from where ? how to do that?

  • @RanveerAllhabadia
    @RanveerAllhabadia Жыл бұрын

    Thanks.

  • @avinashjaiswal4762
    @avinashjaiswal4762 Жыл бұрын

    Congratulations Buddy.

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks for the visit

  • @cse_33_ayandutta48
    @cse_33_ayandutta48 Жыл бұрын

    what is the complexity of this solution

  • @bhuwaneshnainwal8323
    @bhuwaneshnainwal8323 Жыл бұрын

    Congratulations sir ♥️

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks @bhuwanesh

  • @avinashgupta2308
    @avinashgupta2308 Жыл бұрын

    Is it an optimal solution ??

  • @herculean6748
    @herculean6748 Жыл бұрын

    Congratulations 🎉🎉

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks. :)

  • @amankrsingh
    @amankrsingh Жыл бұрын

    Congratulations ❤️🎉

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks Aman

  • @samyak4175
    @samyak4175 Жыл бұрын

    Nice explanation

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Keep watching

  • @shubamgoswami
    @shubamgoswami Жыл бұрын

    top notch content

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks :)

  • @krateskim4169
    @krateskim4169 Жыл бұрын

    congrats

  • @rushikeshkale7303
    @rushikeshkale7303 Жыл бұрын

    Thanks

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks Rushikesh

  • @monishtyagi2354
    @monishtyagi2354 Жыл бұрын

    s.length()-len* wali cheez smjh nhi aayi

  • @leepakshiyadav1643
    @leepakshiyadav1643 Жыл бұрын

    congratulations 🥳🥳

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thank you so much 😀

  • @rameshpokhriyalnishank7445
    @rameshpokhriyalnishank7445 Жыл бұрын

    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

    @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

    @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

  • @anirutthsa6237
    @anirutthsa62379 ай бұрын

    Super bro ❤

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    9 ай бұрын

    Thanks 🤗

  • @Sandeep-zd6dq
    @Sandeep-zd6dq Жыл бұрын

    Subscribed 😇

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks Sandeep

  • @kartikbhatt5924
    @kartikbhatt5924Ай бұрын

    Solution starts from 4:07

  • @pranavsharma7479
    @pranavsharma7479 Жыл бұрын

    solution is ok but i guess its not optimized code, we creating map again and again

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    I agree we can improve it

  • @rohitsoni5491
    @rohitsoni54914 ай бұрын

    actual video starts at 4:10

  • @adolft_official
    @adolft_official Жыл бұрын

    This isnt O(N) solution

  • @hymnish_you
    @hymnish_you Жыл бұрын

    Congrats.. Thanks

  • @hymnish_you

    @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

    @CodeWithSunchitDudeja

    Жыл бұрын

    Your comments are emotion to me 💚

  • @AmitKumar-um8rp
    @AmitKumar-um8rp Жыл бұрын

    c++ solution : leetcode.com/problems/substring-with-concatenation-of-all-words/discuss/2423767/Most-easiest-method-sliding-window

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Java here: github.com/Sunchit/Coding-Decoded/blob/master/July2021/WordLadderII.java

  • @AmitKumar-um8rp

    @AmitKumar-um8rp

    Жыл бұрын

    @@raunakkumar6144 use long long or long long int everywhere . It will work.

  • @amansingh.h716
    @amansingh.h716 Жыл бұрын

    dry run s = "barfoothefoobarman", words = ["foo","bar"] 0123456789 len= 3; map={foo:1,bar:1}; i=0; i

  • @crushed_oreos
    @crushed_oreos Жыл бұрын

    Thanks

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Welcome