Linked List - Data Structures & Algorithms Tutorials in Python #4

Поділитися
Вставка
  • Опубліковано 3 жов 2024

КОМЕНТАРІ • 598

  • @codebasics
    @codebasics  2 роки тому +10

    Do you want to learn python from me with a lot of interactive quizzes, and exercises? Here is my project-based python learning course: codebasics.io/courses/python-for-beginner-and-intermediate-learners

  • @twentytwentyeight
    @twentytwentyeight 3 роки тому +257

    Finally, an instructor willing to take it step by step and explain how everything works together without speaking too fast to make the student feel overwhelmed. Thank you!!!!!!

  • @steverobinson8771
    @steverobinson8771 Рік тому +20

    I've been a software developer / educator for the past 22 years - considering this is free content, available to all, I would say this is one of the best (beginner level) explanations of the linked list data structure I've seen on UA-cam - more power to you Sir

    • @codebasics
      @codebasics  Рік тому +2

      👍🙏

    • @devendudileep1149
      @devendudileep1149 3 місяці тому +1

      Hey, is this enough for placement technical round, I have minimum knowledge in DSA, and would this be enough to atleast implement the basic logic?. Please do reply.

    • @UTKARSHMISHRA-rc8lt
      @UTKARSHMISHRA-rc8lt 3 місяці тому

      @@devendudileep1149 bro you need to practice more questions on leetcode or hackerrank to pass the tech interviews. this is very basic

    • @shantanubiswas5303
      @shantanubiswas5303 Місяць тому

      Can't understand linked list 😢

  • @Xplorer_07
    @Xplorer_07 5 місяців тому +9

    Majority of the comments are appreciating the class , so i think problem is with me😅 , even though i hav completed basics of python , still i did't understand the coding part class that u hav given in this video. Is i am not intelligent enough to understand this ?
    No matters , how hard it is ...
    No matters , how many times i failed..
    i will try it again....😡

    • @akki2016
      @akki2016 2 дні тому

      Even me too😂

    • @quangnhat-uc4ri
      @quangnhat-uc4ri 21 годину тому

      @@akki2016 yeah even though i understand the basic concept of linked list but when its comes to actual code i can only understand 70% of this video

  • @soumya3558
    @soumya3558 4 роки тому +83

    I was searching for videos like these last year. I didn't find them. But I'm so so glad you did this. I will post it on my social media profiles, I'm sure it will help others too! Kudos!!

  • @PresidentArmer
    @PresidentArmer 6 днів тому

    You are by far the best teacher of LinkedList implementation I have had so far. Thanks so much for making this understandable.

  • @vigneshn_learning
    @vigneshn_learning 2 роки тому +51

    1:20 Difference between Static and Dynamic Array
    1:00 Order of array insertion operations
    3:00 Way dynamic array works
    3:30 Linked List
    5:00 Order of operation for linked list
    5:30 Benefits of Linked list
    6:30 Types of Linked list
    7:00 The main advantage of linked list

  • @RAJ_K_
    @RAJ_K_ 3 роки тому +53

    In about 25 minutes, I have learned more than what I've learned in 5+ class lectures.

  • @RuiGomes99
    @RuiGomes99 2 роки тому +6

    You sir are a magician, the amount of things I learned in 30 minutes is unbelievable. Tomorrow I will have my Programming Introduction final exam and you saved my life on this topic. Best regards.

    • @codebasics
      @codebasics  2 роки тому +1

      Best of luck Rui and thanks for your kind words !

  • @rishabhshukla1089
    @rishabhshukla1089 2 роки тому +22

    Rename itr with current_node and count with current_index and the code will be much more understandable! The explanation is really good but the naming could be more intuitive. Thanks for the video!

  • @srijitbhattacharya6770
    @srijitbhattacharya6770 Рік тому +1

    You are a true teacher. Nobody tells us to learn like you do. I have followed your ML class and learnt ML and even cracked a job interview

  • @RH-nk7eo
    @RH-nk7eo 2 роки тому +11

    My first dive into programming a few years ago, I just learnt how to do things without really understanding why. Thanks for taking the time to not only explain what Linked Lists are, but why they are needed!

  • @neelshah1943
    @neelshah1943 2 роки тому +6

    I've watched other DSA videos, but *I am glad that I found this DSA playlist in Python*, I can code side by side. Best part, it covers a variety of aspects, core fundamentals and all the whys before writing the code. Thank you!

  • @nebarolandngwa9014
    @nebarolandngwa9014 4 роки тому +28

    Thank you so much, sir. This is like the best tutorial I have come across and now am happy I now understand the implementation of linked lists in Python.

  • @lyfs2fast
    @lyfs2fast 3 роки тому +5

    This is by far the best Linked list explanation I came across. Thank you so much for the great video!!

    • @codebasics
      @codebasics  3 роки тому

      I am happy this was helpful to you.

  • @ishworbhusal
    @ishworbhusal 2 роки тому +7

    Quite honestly, I have coding interview with one of the FAANG in next two weeks, and I am practicing coding like anything, I have never worked this hard before. I am not sure why, I have liked your entire playlist like I have never liked any tutorials before! Thanks for making this life-saver tutorials! Big Thanks to you!

    • @sheyzi_
      @sheyzi_ 2 роки тому

      I also have an interview with Turing... Please what resources are you using to learn??

    • @eyosiyasengdawork6445
      @eyosiyasengdawork6445 Рік тому

      @@sheyzi_ How did i went?

  • @fnhirwa
    @fnhirwa 3 роки тому +29

    This is a great tutorial I am currently enjoying and revisiting to sharpen my programming skills. Thank you!

  • @oximas
    @oximas 3 роки тому +47

    27:00 that's the funniest thing i ever heard I love it

  • @mattlegge8538
    @mattlegge8538 Рік тому +1

    I'm amazed at how basic this stuff is when it is explained well.

  • @haydar4076
    @haydar4076 2 роки тому +2

    After fully understanding how it worked internally everything else became so easy!
    Thank you

  • @narinpratap8790
    @narinpratap8790 3 роки тому +4

    Woah! These videos are awesome.
    I've been trying out LeetCode problems on DS & Algo, but it was difficult for me to understand the solutions without a background in Java or C++. Your videos explain all the theory using only Python and that's extremely useful for Data Science professionals. Thank you so much :D

  • @Ayush_kumar123
    @Ayush_kumar123 3 роки тому +2

    Thanks for the tutorial. I was looking for tutorials in which the tutor explain while writing codes. The exercises are super-awesome and I think everyone should go and try to solve it. It took me 30 minutes to solve the first exercise moving on to the next.

  • @smithchristian4251
    @smithchristian4251 3 роки тому +39

    I feel like i am attending best lectures of my life.

    • @codebasics
      @codebasics  3 роки тому +4

      Smith I am glad you liked it

  • @Vijay-Yarramsetty
    @Vijay-Yarramsetty 4 роки тому +1

    truly found a gem of channel for upskilling my data structures and algorithms and python skills. you have a long way to go sir.

    • @codebasics
      @codebasics  4 роки тому

      Welcome aboard and thanks for your kind words! if you found this to be useful, feel free to share on linkedin,watsapp, facebook etc

  • @kumarvikramsingh5712
    @kumarvikramsingh5712 3 роки тому +4

    I am loving this series of Data Structures & Algorithms Tutorials in Python. Thank you so much for such great explanation.

  • @drewglapa
    @drewglapa 3 роки тому +1

    I came across this series just trying to touch up on my data structures. You do a phenomenal job going into detail at a human level where anyone can understand. Thank you sir!

    • @codebasics
      @codebasics  3 роки тому +1

      Thanks for your kind words Drew.

  • @shaikrahhil7234
    @shaikrahhil7234 2 роки тому

    Best part of the channel is ,there is no ads 🤗

  • @nerisozen9029
    @nerisozen9029 2 роки тому +1

    Was following a course on coursera on same topic, but you are much better in creating that 'wow' enlightenment moment. Big thanks!

  • @achuthkarthik4689
    @achuthkarthik4689 3 роки тому

    Man you killed it in this tutorial AT 2AM IST I learnt Linked List going forward i'll complete this playlist Thanks for your contribution mate

    • @codebasics
      @codebasics  3 роки тому +1

      I wish you all th best buddy ☺️👍

  • @manojkaranam8602
    @manojkaranam8602 3 роки тому +2

    one of the best tutorials i have ever come across !

  • @udaykirangarlapatti1622
    @udaykirangarlapatti1622 9 місяців тому +1

    Sir, your conceptualization and teaching style are superb, and you present the material very effectively. However, I am facing difficulty understanding the coding part. Could you please consider providing more detailed explanations or dedicate future videos to thoroughly explain the coding aspects? This would greatly enhance my learning experience.
    Thank you.

  • @rajeshkumar-us9qy
    @rajeshkumar-us9qy 2 роки тому

    Great..! I have 7yr of experience. But still i am learning lot of new things from your side. This is what i was looking long time. Thank you so mush..!

  • @ahyungrocks5509
    @ahyungrocks5509 7 місяців тому

    Love your training video and the swimming example at the end.
    I watched quite a few videos prior to yours and none of them makes sense until I come across this. Thank you!

  • @kaushalshrivastav7213
    @kaushalshrivastav7213 3 роки тому +3

    Thank you so much for your efforts you've put in teaching us DS in simple way...Really appreciate your way of teaching...Have tried something from my side too so sharing the code for functions given for assignment...
    ```
    def insert_after_value(self, data_after, data_to_insert):
    #check for first occurence of data_after and insert the value after it
    head = self.head
    pos = 0
    isValExist = False
    while head:
    if head.data == data_after:
    if pos == self.get_length():
    self.insert_at_end(data_to_insert)
    else:
    self.insert_at(pos+1, data_to_insert)
    isValExist = True
    break
    head = head.nextNode
    pos += 1
    if not isValExist:
    raise Exception(str(data_after)+" Value doesn't exist in LinkedList")
    def remove_by_value(self, value):
    head = self.head
    pos = 0
    isValExist = False
    while head:
    if head.data == value:
    if pos

  • @iffyaiyan8942
    @iffyaiyan8942 4 роки тому

    How can someone teach all this with so much explanation and patience,
    You rockz

  • @WeakCoder
    @WeakCoder 4 роки тому +9

    This is a goldmine really!.. I hope you keep uploading

  • @mr.actuary8147
    @mr.actuary8147 3 роки тому +12

    You explained it very well. Thank You. Also if possible, please create a new playlist where you put some good exercise questions and coding challanges on Data Structures and Algorithms to prepare for coding rounds in placements.

  • @blazkowicz666
    @blazkowicz666 3 роки тому +9

    Such a beautiful Course For Interview Prep, Please Upload More!!

    • @codebasics
      @codebasics  3 роки тому +1

      I am happy this was helpful to you.

  • @priyankadutta8798
    @priyankadutta8798 3 роки тому +1

    Best explanation and proper way to make understand linked list .....❤️❤️
    But for beginners , at first they have to know how linkedlist works but for the students who have some basic ideas about linkedlist ,can understand this

  • @nitinthokare
    @nitinthokare 2 роки тому +6

    It's interesting to learn from such a great trainer.
    I'd like to point out one update to the program: We should not be using self.get_length() while inserting or removing an element. That call results in O(n) even to insert or remove at the beginning.
    Please correct me if I'm wrong.

    • @monooo
      @monooo 2 роки тому

      I thought the same and I implemented this:
      def remove_at(self, index):
      if not self.head:
      return
      if index == 0:
      self.head = self.head.next
      return
      node = self.head
      _index = 0
      while node:
      if _index + 1 == index:
      node.next = node.next.next
      return
      if not node.next:
      return
      node = node.next
      _index+=1

    • @sava-lakicevic
      @sava-lakicevic 2 роки тому

      You need to verify the index though, no? If the index is longer than the length of the list, then you get an error. In any case, the time stays O(n).

    • @monooo
      @monooo 2 роки тому

      @@sava-lakicevic Yes, we can think in the algorithm order in the worst and best case. If we use the get_length method you will always have an O(n), but if you don't use it you can have a O(1) in the best scenario which is removing at the beginning.
      I don't think that you need to verify the index in the code that I wrote, because if index > len(linked_list) you will return null because you will exit the while loop before reaching the condition _index+1 == index

    • @nitinthokare
      @nitinthokare 2 роки тому

      @@sava-lakicevic In those (out of bound) cases it will be O(n).

  • @Hex-Scholar
    @Hex-Scholar Рік тому +2

    Hey, nice tutorial thank you!
    I went for a recursive approach in implementing the linked list insert / delete methods.
    I also had a Class Variable to keep the total count of index it will increase by 1 when any insert is done while decrement by 1 when a deletion takes place, so I override __len__ method in Python and used that to give it a more generic list type vibes same for printing the list used __str__.
    I am currently trying to implement an additional argument tail inside, that will keep track of the last node, so so I don’t have to traverse to the end to insert making the time complexity for inserting / deletion at the end O(1)!!
    I also implemented other default list methods like: count, reverse, sort!!
    A great practise.

  • @hg7_
    @hg7_ 3 роки тому +8

    Thank You for the amazing insights for all the topics you have covered in this playlist. Thanks a lot! Highly appreciate your efforts.

  • @sheikhakbar2067
    @sheikhakbar2067 3 роки тому

    One of the best tutorials on linked-list I've ever seen!

  • @sava-lakicevic
    @sava-lakicevic 2 роки тому

    Great video; I am preparing for an interview, and I am highly engaged with your tutorials, very easy to understand and follow, and I understood immediatelly how to do the first exercise, will be doing the second one soon as well. Thanks a lot!

    • @codebasics
      @codebasics  2 роки тому

      Sava I wish you all the best for your interview

  • @jameskim9136
    @jameskim9136 2 роки тому

    The best explanation of linkedlist I've found on youtube! Thank you!!!

  • @antoineprog8968
    @antoineprog8968 10 місяців тому

    Out of all of the tutorials I've watched. This is undoubtably the best. Got you a new sub and a thumbs up! Thank you so much!

  • @rahuliron1635
    @rahuliron1635 Рік тому

    Thank you so much for explaining the Linkedlist concept in a simple way now I am able to write a linked list program in python

  • @amakaoraekwe4769
    @amakaoraekwe4769 4 роки тому +10

    Excellent tutorial, highly recommended

  • @umangjoshi2660
    @umangjoshi2660 3 роки тому

    Highly recommended. Point to point neat and clean explanation

  • @mohammadkareem1187
    @mohammadkareem1187 2 роки тому +1

    great video, thanks a lot. However I have couple of minor comments: 1) it was good to mention that python deque is already implemented all these methods and more. 2) in the insert_at method, you should have check the index for being at the end, to use the insert_at_end instead of looping through all elements in the list.

  • @enrique.guzman891
    @enrique.guzman891 3 роки тому +1

    i appreciate you walking us through, AND including an exercise.

  • @milkonion
    @milkonion 4 роки тому

    Best help I have gotten regarding data structures. VERY CLEAR INSTRUCTIONS!!! Ugh I love you

    • @codebasics
      @codebasics  4 роки тому

      Glad you liked it Michael 👍😊

  • @TravelwithkaustubhSingh
    @TravelwithkaustubhSingh 4 роки тому +3

    I might be incorrect but i have a doubt.
    If there is already an element in the linked list and you will call insert_at_beginning method there is no link between the previous element and the new element because you are not linking, still it is printing because you are storing all the inserted elements in llstr.
    This will create a link between previous and new element temp=self.head self.head=Node self.head.next=temp in the insert_at_beginning method.
    @codebasics

  • @jaswantgupta519
    @jaswantgupta519 3 роки тому

    Best tutorial I have come across. Enjoying it and revisiting the DS to enhance my skill. Loving it.

  • @craziegeek
    @craziegeek Рік тому

    I'm just loving this tutorial playlist. Thank you Code Basics!

  • @farazp096
    @farazp096 6 місяців тому

    Instead of traversing through the entire list to get size of the list. You can define a variable in the constructor function eg: self.counter, so whenever you add or delete a node just update the counter. And you can get the length of list in O(1) time complexity.

  • @user-ng4bc3cv6g
    @user-ng4bc3cv6g 3 роки тому +1

    You are the best.
    Explained such complex topics in an easy way 👌👌👌

  • @cli4rd
    @cli4rd 5 місяців тому

    This was really great. I also learned a lot more when I did the exercises at the end on my own. Thank you!

  • @boscojay1381
    @boscojay1381 4 роки тому +4

    I was coding along until at some point it got complex, so I decided to watch the whole thing first..but I dosed while watching..then for some reason I got up towards the end and heard @codebasics say...if you won't practice..forget it, you are wasting your time.. ouch, now I will have to start the video again **slapping my face**

  • @mahmoudsharqawi1541
    @mahmoudsharqawi1541 3 роки тому

    best tuturials i have found so far, keep the good work man we all support your works. peace!!

    • @codebasics
      @codebasics  3 роки тому

      I am happy this was helpful to you.

  • @SENAPATIENTERTAINMENT
    @SENAPATIENTERTAINMENT 3 роки тому

    Best tutorial on linked list oat.

  • @philiperiskallaleal6010
    @philiperiskallaleal6010 4 роки тому +2

    Dear Codebasics,
    Thank you for this amasing video. The example shown depicts exactly the theory.
    Nevertheless, I got confused about one major aspect of the code implemented in Python for creating the linked lists.
    I understood that the building block of the Linked List class (LLC) is an iterator containing an instance of a base classe (the class Node).
    In python, I am used to see iterator objects being defined in the body of the user's class. Therefore, I was expecting to have an internal method (i.e.: __iter__) in the Node class. Nevertheless, the provided example does not have it, and yet, the iteration of the Node class occurs nicely within the LLC own methods.
    Why does it happen? Shouldn't a '__iter__' method be defined in the Node class?
    Finally, shouldn't the instance of the Node be deleted/rewrited every time the "LLC.add_at_begining", or the "LLC.add_at_end" methods be called? After all, the LLC is instanciating a new Node in its own "self.head" attribute.
    Sincerely,
    Philipe Riskalla Leal

  • @pranjalchaplot
    @pranjalchaplot 4 роки тому +6

    Thank you sir for this series, especially doing this in Python it was really hard to find DS and Algo implemented in Python.

    • @codebasics
      @codebasics  4 роки тому +1

      Yup I know. That's why I selected python

    • @murariteja4909
      @murariteja4909 4 роки тому +1

      @@codebasics but didn't complete all the data structures 😏

  • @sreejaroy8463
    @sreejaroy8463 2 роки тому

    this is the most useful 28 minutes I spent today!

  • @gauravkumar2602
    @gauravkumar2602 3 роки тому

    Love the way you teach and make things easy to understand.

    • @codebasics
      @codebasics  3 роки тому +1

      I am happy this was helpful to you.

  • @Saurav061
    @Saurav061 5 місяців тому

    For inserting at end, and the edge case if head is None there is another alternative
    def insert_at_end(self,node):
    temp = self.head
    if not temp:
    self.insert_at_beginning(node)
    return
    while temp.next:
    temp = temp.next
    temp.next = node
    node.next = None

  • @dhruvsanghavi2039
    @dhruvsanghavi2039 3 роки тому

    Very great.....you just dont want to teach but also make the students learn through the exercise🤩

  • @nahomg6945
    @nahomg6945 6 місяців тому

    Amazing explanation and analysis of LinkedList, new subscriber for sure!

  • @ankurkushwaha5150
    @ankurkushwaha5150 3 роки тому

    Big brother you are angel for us for all these courses

  • @user-gs2zp3dm1v
    @user-gs2zp3dm1v 2 роки тому

    excellent tutorial. The exercises at the end are great for re-enforcement of what is taught and application of the knowledge to take it one step forward. Great work. Thanks a lot.

  • @LorisDuka-d9j
    @LorisDuka-d9j 22 дні тому

    Would like to add that on insert_at, you could add the functionality of inserting at the end by doing the check
    if index < 0 or index >= self.get_length()+1:

  • @naziburrahman852
    @naziburrahman852 3 роки тому +2

    "Best way to learn something is by teaching it. "
    "One can't teach a subject which he don't understand well."
    Now the thing is you are amazing. And love from Bangladesh.
    Preparing for interviews pray for me.

  • @rajanitnavapara5761
    @rajanitnavapara5761 3 роки тому

    I was trying to understand it completely and I got something that had completed my wish. Thank you soooo much. ♥♥♥

  • @huongpham3580
    @huongpham3580 5 місяців тому

    you helped me so much for my coding interview. thank you!!

  • @venugopalbv2069
    @venugopalbv2069 3 роки тому

    for printing linkedlist, no need to create llstr as seperate variable and append the data, print statement provides an option to do the same.
    print(itr.data, end="-->")
    Thanks.

  • @muhammadumarsotvoldiev9555
    @muhammadumarsotvoldiev9555 Рік тому +1

    Thank you very much for your work!

  • @HieuVo-qt1xx
    @HieuVo-qt1xx 4 місяці тому

    this is a great video i have ever learned about linked list . Thank sir

  • @joshstir8659
    @joshstir8659 2 роки тому +1

    Great series of videos. Kudos to you for the effort put into these. Very informative!

  • @xXHelsingGamingXx
    @xXHelsingGamingXx 2 роки тому

    Should have come to this tutorial First! All the topics are here! :-)

  • @saikumarmolli6479
    @saikumarmolli6479 3 місяці тому

    Thank you man, Now I'm clear with this concept

  • @computersindia
    @computersindia 2 роки тому

    Excellent Explanation on all the features of linked list !❤!

  • @EkaterinaSimakova-p5f
    @EkaterinaSimakova-p5f 27 днів тому

    Thank you very much for your video! It really helped me to understand the whole topic.

  • @vuppusivakumar1421
    @vuppusivakumar1421 4 роки тому +1

    At 1:20 you started saying about list in python i have a doubt in that , you said that if u insert an element in a list at a particular position , from that position all the elements in the list below has to shift to different memory location , that means address locations are changed . i have an example below .
    a=['siva','ravi','raju','mani','rani']
    for x in range(len(a)):
    print(a[x] , id(a[x]))

    z = "----------"
    print(z)
    a.append('madhu')
    a.insert(1,'nani')
    for x in range(len(a)):
    print(a[x] , id(a[x]))
    output :
    siva 53768352
    ravi 53768448
    raju 53768512
    mani 53768544
    rani 53768672
    ----------
    siva 53768352
    nani 53768736
    ravi 53768448
    raju 53768512
    mani 53768544
    rani 53768672
    madhu 53768704
    if u check the output of ids of ravi, raju, mani, rani are same before and after the insertion of element nani at position 1 .
    why did not the location ids change?

    • @celshyad
      @celshyad 4 роки тому

      Is it linking the new insertion? confused !!!

  • @chiragpalan9780
    @chiragpalan9780 2 роки тому

    I think along with link list my Oops confusion is clear. Thank you.

  • @sayantandas7054
    @sayantandas7054 4 роки тому +15

    Sir a kind request to you,,, please sir include some popular algorithms like greedy, dynamic programming, knapsack, Dijkstra etc after completing all data structure topics... which gonna help us in campusing time also...please sir,,, there's no such video in UA-cam where it's taught with both theory and coding..please sir a request

    • @codebasics
      @codebasics  4 роки тому +22

      Sure, I have noted down these topics and will try to cover them in future 👍😊

    • @oximas
      @oximas 3 роки тому

      @@codebasics thank you

  • @akshaynitin5589
    @akshaynitin5589 3 місяці тому

    In remove at, there is problem for example I need to remove last node. but it will give exception in your current code. I just modified it.
    def remove_at(self, idx):
    if idx < 0 or idx > self.len_singly_linked_list():
    raise Exception("invalid index")
    if idx == 0:
    self.head = self.head.next
    return
    count = 0
    itr = self.head
    while itr:
    if count == idx - 1:
    if itr.next and itr.next.next is None:
    itr.next = None
    else:
    itr.next = itr.next.next
    break
    itr = itr.next
    count = count + 1

  • @samar1900
    @samar1900 4 роки тому +1

    Thank you, I was just revising data structures.. this is perfect..at the end regarding excise,what you told(virus),kind of funny..I really liked it man .. :)

    • @codebasics
      @codebasics  4 роки тому

      ha ha.. glad it brought a smile on your face :)

  • @yashwantsahu6901
    @yashwantsahu6901 2 роки тому

    Thank you very much your step by step explaination really helps

  • @shilpag4961
    @shilpag4961 2 роки тому

    well organized and explained the concept hands on! kudos.

  • @gamescan34
    @gamescan34 2 роки тому

    for ques1 if we dont know the values inside the list we should write like this:
    print(abs(Mexp[0]-Mexp[1]))
    gives the absolute value
    Ques2:
    print(sum(Mexp[:3]))

  • @lukebauer5495
    @lukebauer5495 2 роки тому

    Lol, the virus threat XD. Thanks for the demo, learned a lot.

  • @aleefbilal6211
    @aleefbilal6211 2 роки тому

    I just can't thank you enough. You made it so much simpler.

  • @kumaranp8764
    @kumaranp8764 3 роки тому

    "Let's test this method" is what he intended to say but "Let's taste" is what that is coming out.
    BTW the lecture was so nice what makes it even more special is that its in python unlike the normal C.

    • @codebasics
      @codebasics  3 роки тому +1

      hey thanks much for pointing it out. I am not a native english speaker and I still make mistakes. I just watched some videos on taste vs test pronunciation and I think now I can pronounce them better.

    • @kumaranp8764
      @kumaranp8764 3 роки тому

      @@codebasics sir so sweet of you...I feel bad for saying this now..my apologies!

    • @kumaranp8764
      @kumaranp8764 3 роки тому

      def insert_after_value(self, value, data):
      itr = self.head
      while itr:
      if itr.data == value:
      node = Node(data, itr.next)
      itr.next = node
      break
      itr = itr.next
      else:
      raise Exception("No value like that in this linked list")
      def remove_by_value(self,value):
      itr = self.head
      count = 0
      while itr:
      if itr.data == value:
      break
      count += 1
      itr = itr.next
      ll.remove_at(count)

    • @kumaranp8764
      @kumaranp8764 3 роки тому

      this works too sir!

  • @ayeshak7983
    @ayeshak7983 2 роки тому

    id be so screwed without your videos

  • @PrakEnTech
    @PrakEnTech 3 роки тому +1

    Exercise Solved -
    def remove_by_value(self,val):
    itr=self.head
    c=0
    while itr:
    if itr.data==val:break
    itr=itr.next
    c+=1
    itr=self.head
    c,d=0,c
    while itr:
    if c==d-1:
    itr.next=itr.next.next
    break
    itr=itr.next
    c+=1
    def insert_after_value(self,dataAf,val):
    itr=self.head
    c=0
    while itr:
    if itr.data==dataAf:break
    itr=itr.next
    c+=1
    c,d=0,c
    itr=self.head
    while itr:
    if c==d:
    node = Node(val,itr.next)
    itr.next=node
    break
    itr=itr.next
    c+=1

  • @preetisamudrala1121
    @preetisamudrala1121 3 роки тому

    the way u explained is superb

  • @datascience3008
    @datascience3008 Рік тому

    Great,at some point I got really into it and started doing alone

  • @mansuriaziz
    @mansuriaziz 2 роки тому

    Thank you for great explaination, i had hard time understandjng prepend or inserting in front, now i am confident.
    Thanks alot..

  • @KevinMrLam
    @KevinMrLam 5 місяців тому

    The video is so good! Thanks for the effort

  • @tionut4228
    @tionut4228 4 роки тому +2

    Great content! Thank you for sharing your knowledge!