Trie Data Structure

Поделиться
HTML-код
  • Опубликовано: 31 янв 2025

Комментарии • 397

  • @anmoljawa8367
    @anmoljawa8367 4 года назад +61

    I really really like the way Tushar explains things, not giving out the code, but just the understanding one needs for the problem . Truly appreciate your effort @Tushar

    • @RitikSingh-bt3gp
      @RitikSingh-bt3gp 3 года назад

      Actually the code to the problem is in description box. But yes your point is commendable

  • @GokulRG
    @GokulRG 8 лет назад +160

    Bro.. You're the best tutor i know man.. Thanks a lot...

    • @Anubis10110
      @Anubis10110 6 лет назад +6

      Check Mr.Abdul Bari for Algorithms...He is More than Amazing..This guy is good too

    • @Yagamilight19383
      @Yagamilight19383 5 лет назад +6

      If he is the best tutor you know, you really need to see the world ...

    • @rookieexplorer007
      @rookieexplorer007 4 года назад +5

      @@Yagamilight19383 stop comparing pagalo....

    • @tryler449
      @tryler449 4 года назад +1

      ^^ This, Tushar is totally a friend.

    • @universeboss4865
      @universeboss4865 4 года назад

      @@Yagamilight19383 200% true..., yeah he is good but not the best...

  • @lkez2
    @lkez2 8 лет назад +20

    Wow. I just want to say thank you from the bottom of my heart. You are an amazing teacher. And you have no idea how much making these videos means to me. Thank you again

  • @hehhehdummy
    @hehhehdummy 8 лет назад +4

    I think it's wonderful that you took the time to go over the code. I'm much more happy to see that you explained both the recursive and iterative implementations of the functions. Thanks so much!

  • @azeeztaiwo2802
    @azeeztaiwo2802 5 лет назад +6

    one of the best tutorials i have seen on tries.

  • @tanujabharti8043
    @tanujabharti8043 4 года назад +1

    Trie was used to one of the nightmares for me...because of your video it becomes so easy...thank you :)

  • @shyam5631
    @shyam5631 4 года назад

    It's 2020 and still this is best channel to learn data structures and algorithms.

  • @liangbinchen2519
    @liangbinchen2519 4 года назад +1

    Well I haven't went through all the videos about Trie yet but this is by far the best. Great work!

  • @chintalapativenkataramarahul
    @chintalapativenkataramarahul 6 лет назад +17

    I cannot even say how thankful I am to you for making this video. Thank you very much! Great explaination.

  • @iamsurmeli
    @iamsurmeli 7 лет назад

    You are the best data structure & algorithms instructor I have ever seen in my life.

  • @rajmmehta495
    @rajmmehta495 5 лет назад

    Thank you so much Tushar literally watching your videos has helped me pass engineering and its still helping while working as a professional.

  • @umcanes2005
    @umcanes2005 5 лет назад +3

    Best walkthrough of Trie I have ever seen.

  • @alexitosrv
    @alexitosrv 8 лет назад

    Excellent explanation!! When I find algorithm descriptions like this I feel I can reconstruct the code any moment ever. Thank you.

  • @rajuathokpam
    @rajuathokpam 5 лет назад +3

    this is a great piece. i am revisiting this video today after a year again

  • @displacednaija
    @displacednaija 5 лет назад +2

    Wow, I know more about deep software system analysis in a few minutes of listening to this man than all my time interacting with devs in almost 6 years.

  • @ivandrofly
    @ivandrofly 10 месяцев назад +1

    Thanks :) - I've learn trie before but needed a refresh

  • @morampudiakhil516
    @morampudiakhil516 4 года назад

    You have just made my day! Always feared of the word Trie, Now I feel very comfortable implementing it. Just Superb Job, Thanks

  • @anirudhraovasudevarao3211
    @anirudhraovasudevarao3211 7 лет назад +1

    By far the best explanation for trie data structure. Thanks a ton for this video. What makes this video unique is the usage of sample strings to explain , which cover the corner cases.

  • @jaatharsh
    @jaatharsh 4 года назад

    this is superb, can't thank you enough dude, keep on uploading such quality content.

  • @pixelpaxal
    @pixelpaxal 3 года назад

    This is the best explanation of Trie, you really helped readers establish a proper mental model of this data structure and it’s implementation.

  • @cwash08
    @cwash08 8 лет назад

    Top notch. I've heard of trie but have never learned about it before.

  • @arunvyas27
    @arunvyas27 8 лет назад

    Thanks a lot man, I have always stayed away from Trie but now after watching your video it seems so easy. :)

  • @KushBaronj
    @KushBaronj 8 лет назад +1

    Simple and to the point explanation . Thankyou so much, your videos are really help full.

  • @nimbalkarvicky9
    @nimbalkarvicky9 Год назад +1

    Great explanation. You missed to mark node "False" at 6:55, when inserting "d" value.

  • @iofirag
    @iofirag 5 лет назад

    This is the best video in youtube for Trie data structure i have found!

  • @raviagarwal4287
    @raviagarwal4287 4 года назад

    Sir, your explanation is very clear and easy, your video helps me to understand this topic in a very easy way!!.
    Thank you😊

  • @ayushjindal4981
    @ayushjindal4981 6 лет назад

    Thumbs Up!!! The examples you take to demonstrate the concept are quite good

  • @travellerpal4911
    @travellerpal4911 4 года назад

    This guy is really amazing at teaching new concepts

  • @QuinsonHonQBB123XX
    @QuinsonHonQBB123XX 4 года назад +1

    This video has helped me a lot in understanding Tries. The concepts were well-explained and I was able to come up with my own implementation on C++ fairly easily. Thanks!

  • @andrewthmas
    @andrewthmas 4 года назад

    You are a good teacher and a good Developer

  • @nouraa1258
    @nouraa1258 6 лет назад

    Thank you so much! This is the best tutorial on Tries. I really appreciate your efforts.

  • @soniamartis9849
    @soniamartis9849 8 лет назад

    excellent video on tries. Never understood tries before watching this video!!

  • @Shades.of.life.by.Vandana
    @Shades.of.life.by.Vandana 5 лет назад

    explained in very easy way...very good Tushar

  • @abhishek8263
    @abhishek8263 8 лет назад

    Thanks @tushar. Your explanations are very easy to understand. it really help to learn quickly.

  • @cashlalala
    @cashlalala 6 лет назад

    This is really awesome, long live Tushar!!

  • @Bala-go6cc
    @Bala-go6cc 8 лет назад

    Simple and superb explanation..thanks tushar roy!!

  • @rohanthakrar7599
    @rohanthakrar7599 Год назад

    Thank you Tushar this is a great, well explained lecture

  • @DenisG631
    @DenisG631 8 лет назад +2

    Excellent! It doesn't get any better. Thank you for your explanation!

  • @vaibskinikar
    @vaibskinikar 8 лет назад +2

    Superb explanation!! Was waiting for this video. Thanks so much for taking out time!

  • @deepamgupta8011
    @deepamgupta8011 4 года назад

    Great explanation @Tushar Roy

  • @sunpacksun2954
    @sunpacksun2954 4 года назад

    Hello Tushar, I listen to your videos because I like your introduction "Hello Friends" Thanks for the videos

  • @AKASH-sw9bs
    @AKASH-sw9bs 4 года назад

    thanks sir . such a elegant explanation , easy to understand , better then one on gfg.

  • @xahraahmadi9207
    @xahraahmadi9207 4 года назад

    its very good that you are at first explain then give a code its very good plz do that with other videos that you will be share

  • @metapoynter
    @metapoynter 8 лет назад

    Thank you very much @Tushar Roy for this tutorial. You really did a good job, explaining it clearly. I was able to do the coding challenge on HackerRank that is of difficulty level Hard very easily.

  • @lanpingdeng1094
    @lanpingdeng1094 4 года назад

    Great video and code, now I am clear about the TRIE

  • @maheshvshet
    @maheshvshet 8 лет назад

    Awesomely clear explanation. Thanks for sharing knowledge.

  • @kuanlin4171
    @kuanlin4171 8 лет назад

    Very nice explanation! It really helps me understand the trie data structure!

  • @tishachoudhuri7082
    @tishachoudhuri7082 8 лет назад

    Great explanation Tushar dada! you make things simple for new programmers :)

  • @MichaelShingo
    @MichaelShingo Год назад +1

    great intro to tries thank you, now to try this leetcode problem in python...

  • @ajr1791ze
    @ajr1791ze 5 лет назад

    best video on trie ever and forever.

  • @prajaktabelgundi6461
    @prajaktabelgundi6461 8 лет назад

    Excellent video for understanding Trie implementation ! Thanks a lot !

  • @venkateswarank1145
    @venkateswarank1145 5 лет назад

    There is a small bug in delete method.
    It should be "return !root.isEndOfWord && root.children.size() == 0;".
    Else that would delete all prefixed characters as well
    Thanks so much Tushor for everything that you do for us

  • @shubhamkhatri445
    @shubhamkhatri445 8 лет назад

    My trie is super clear after watching your video....thank you for creating this video:))....it would be great if you teach ternary search tree also...

  • @yossi_cohen
    @yossi_cohen 8 лет назад

    You are a talent!!! good examples and excellent explanations

  • @kishorguptha
    @kishorguptha 6 лет назад

    nice video. the videos which you present are really good..man..

  • @sidhantakumarpattnaik2962
    @sidhantakumarpattnaik2962 8 лет назад +1

    waited for this video . Thanks so much ...

  • @gurpreettata
    @gurpreettata 4 года назад

    great way to explain the topics. crystal clear

  • @nagamass
    @nagamass 5 лет назад

    Excellent Explanation. at 16:37 in video, in Insert method, node = current.children.get(ch) NOT current=node; this will fail at every first character.

  • @shubhamsinghal6226
    @shubhamsinghal6226 7 лет назад

    Best Video to understand the concept in detail

  • @PraveenGudivaka
    @PraveenGudivaka 8 лет назад

    Nice Explanation,
    I save lot time to me in understanding this data structer.

  • @RagazzoKZ
    @RagazzoKZ 5 лет назад +1

    As always very helpful

  • @caimgeo5009
    @caimgeo5009 6 лет назад

    Wonderful explanation and simple coding..

  • @starc701
    @starc701 4 года назад

    Ek like to bnta hai tushar bhai k liye .sa b like kro bhai ka video

  • @PizzaAndEminence
    @PizzaAndEminence 4 года назад

    Amazing explanation, thank you so much

  • @tahanimachowdhury
    @tahanimachowdhury 8 лет назад

    Your explanations are very clear. Thank You for your efforts. Please make a video on Suffix Array.

  • @gloverelaxis
    @gloverelaxis 5 лет назад +4

    Thanks for your useful labour here Tushar! I'd recommend getting a "lavalier" or just "lav" microphone; they're the ones that you clip onto your shirt's lapel. It would help the audio quality a _lot_, and make following the explanations a lot easier for international people who only know English as a second language. Lavalier mics are also relatively cheap compared to other kinds of microphone.

  • @xuwang3253
    @xuwang3253 6 лет назад

    I like your videos: sufficient exemplar demonstrations and clear codes!

  • @kraj2217
    @kraj2217 4 года назад

    Awesome explanation. Thanks a lot!

  • @pilidvini
    @pilidvini 8 лет назад

    Very clear and simple explanation :) Thanks

  • @missndshah
    @missndshah 4 года назад +1

    I keep waking my computer screen when this video goes to a next section lol

  • @ababbaba7600
    @ababbaba7600 7 лет назад

    Thanks Tushar, very good explanation.....video was very helpful!!

  • @lorinbehringer3147
    @lorinbehringer3147 8 лет назад +1

    excellent explanation! your videos are really helpful

  • @codetolive27
    @codetolive27 6 лет назад

    Awesome video!! Keep up the good work

  • @prathashukla6596
    @prathashukla6596 4 года назад

    perfectly explained good job as always!

  • @mohammedsadiq8178
    @mohammedsadiq8178 5 лет назад

    That code was really beautiful man! Awesome!

  • @ChristianESL
    @ChristianESL 6 лет назад

    I love your videos. Thanks. You are the best.

  • @raavikaGaba
    @raavikaGaba 5 лет назад

    Kudos Tushar, you are an epitome of how to put up things in a concise and easy way , was really helpful, kindly upload more such videos

  • @calliart6586
    @calliart6586 5 лет назад

    Excellent.. Exactly like my notes

  • @sreenathc
    @sreenathc 4 года назад

    Excellent explanation. I think this would be so easy to implement in a functional programming language like Haskell...will have to try thst

  • @Bakepichai
    @Bakepichai 6 лет назад

    Beautiful explanation Tushar

  • @jayeshudhani99
    @jayeshudhani99 3 года назад +2

    Awesome video. However, there is one error in the code :
    While returning inside if(shouldDeleteCurrentNode) , it should be return current.children.size() == 0 && !current.endOfWord;
    Basically, if a word is ending at this node, then we shouldn't delete this node.
    Consider for example if we insert "jayesh" and "jay" in the trie and delete "jayesh", it would delete both the strings which is incorrect.

  • @laracroft9079
    @laracroft9079 8 лет назад

    love your channel! pls keep up the good work:)

  • @kamal-kp9wo
    @kamal-kp9wo 8 лет назад +5

    Thanks for the amazing video. You are doing a great job and I really appreciate your effort. Your videos helped me a lot.
    Although this is very trivial, I would like to point out that in the code provided,
    If there are "abc" and "ab" in the Trie, after removing "abc", the search for "ab" return false.
    Again thanks for the video.

    • @VikasSingh-eu6vk
      @VikasSingh-eu6vk 4 года назад

      if (i == input.length()) {
      if (!current.endOfWord) {
      return false;
      } else if(current.children.size() > 0) {
      current.endOfWord= false;
      }
      return current.children.size() == 0;
      }

  • @叶子豪-t6g
    @叶子豪-t6g 8 лет назад +12

    I feel the highlighted line @19:31 should be:return current.children.size() == 0 && !current.endOfWord;Imagine this case:Insert("ab");Insert("a");Delete("ab"); Your code will also delete "a"?

    • @RS7-123
      @RS7-123 7 лет назад +1

      叶子豪 i just thought about the same scenario.. thanks to your comment, i was able to validate my understanding as well..

  • @MW-fm1qq
    @MW-fm1qq 4 года назад

    Amazing explaining! Thank you so much!

  • @yodamite1348
    @yodamite1348 4 года назад

    Make inner class TrieNode Static so that it does not require an instance of the outer class to be used. Amazing video!

  • @pushkarnarayan597
    @pushkarnarayan597 8 лет назад

    Great tushar .. Keep it up

  • @Joyddep
    @Joyddep 5 лет назад

    Wow. Really good explanation!

  • @PaddyVicky
    @PaddyVicky 8 лет назад

    A good simple to the point tutorial. Thx

  • @shwetasingh7906
    @shwetasingh7906 2 года назад

    Great video ❤️

  • @Chintanp7
    @Chintanp7 7 лет назад

    Nice and clear explanation. Thanks :)

  • @praveenchukka
    @praveenchukka 7 лет назад

    Awesome video man :) you made it so simple.

  • @asifbilla4924
    @asifbilla4924 7 лет назад

    Nice Video...Thanks for your effort to make this video..

  • @Klaster961
    @Klaster961 7 лет назад

    Amazing explanation as always

  • @GurpreetSingh-th1di
    @GurpreetSingh-th1di 5 лет назад

    best explanation on trie

  • @rookieexplorer007
    @rookieexplorer007 4 года назад

    Tushar bhai tussi great ho!

  • @vjnvisakh
    @vjnvisakh 8 лет назад

    awesome man ... hats off to you

  • @rengasamyerrappan1122
    @rengasamyerrappan1122 7 лет назад

    Nice explanation, thanks for the video.

  • @rahuldevmishra4558
    @rahuldevmishra4558 7 лет назад +2

    +Tushar Roy - Coding Made Simple - I have a question at 12:55
    Lets say, there is another word "cbc", which means that it will end at the node "c". Now we have two words '"abc" and " cbc". So when we delete the word "abc", we mark the node following "c" to false which would also delete "cbc". So how do we handle this scenario ?

    • @NitishSarin
      @NitishSarin 7 лет назад +2

      "abc" starts with 'a' and "cbc" starts with c, so they will have different starting paths from the base root node. This situation will never occur. both will have an ending 'c' node, but these will be two different and independant nodes.
      Hope you understood! :)

    • @rahuldevmishra4558
      @rahuldevmishra4558 7 лет назад

      + Nitisha Sarin - Thank you for the explanation.

  • @NaveenKumar-ni1qs
    @NaveenKumar-ni1qs 8 лет назад +4

    Very nice explanation just as in your other videos. Thanks!!
    I think there is something wrong at 6:55, in TrieNode containing d, the endofword is marked as true. It should be false and only its child should represent endofword as true.

    • @NaveenKumar-ni1qs
      @NaveenKumar-ni1qs 8 лет назад +5

      I'm sorry. I realised where I was going wrong. There wasn't any mistake. I was a bit confused.

    • @JimitRupani
      @JimitRupani 8 лет назад +1

      can you explain me that d thing i am still confused so?

    • @bobbySchoi
      @bobbySchoi 7 лет назад +2

      When we search a whole word "abc", our algorithm should make sure that is end of the word (next child node, where the "d" is" should have end of the word marked as True "T". That is how we will know. Hope this helps!

    • @MrRantelo
      @MrRantelo 6 лет назад +1

      Supporting the explanation of Bobby Choi, the part of the video that explains this concept is between 10:54 - 11:20