Linked List Data Structure 3. Building a Linked List (algorithm and pseudocode).

Поділитися
Вставка
  • Опубліковано 24 січ 2025

КОМЕНТАРІ •

  • @monirarad1683
    @monirarad1683 7 років тому +3

    your explanation is great , thank you for sharing such a useful video

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

    Very precise explanation thanks

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

    How do you know David comes after Chloe and Beatrix comes before Chloe etc

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

      There is the order in which the data was added to the data structure, but a system of pointers implies an alternative order. :)KD

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

    I totally do not understand the pseudocode. Can you please explain it with the exmaples (Chole, F, B,D,E,A)?
    What is Data(ptr)?
    If Data(ptr) = every data we ask , like when we insert David, data(ptr): Chloe(2), Francis(0), Beatrix(1)????

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

      Data() is an array variable. Next() is also an array variable. ptr varies within the loop to identify specific items of data. prevPtr varies to identify specific next items when following the trail of pointers. I have made a video on how to implement a linked list in VB.NET (which looks a lot like pseudocode) , that you might find useful to watch as well.
      ua-cam.com/video/WCnYCcy_93A/v-deo.html
      I admit that the linked list is a challenging data structure and it takes time to get to know it well. You need to be comfortable with array variables and looping constructs first. I honestly think the best way to get to know any data structure well is to code it up, and then step through the code slowly, line by line. The linked list is a data structure worth persisting with, you can learn a great deal from it. The same ideas and techniques are used in the binary search tree. This then leads on to graphs and pathfinding algorithms. :)KD

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

      @@ComputerScienceLessons Any link to the code for this?

  • @18kurama
    @18kurama 7 років тому +1

    you're a life saver! thank you very much! :)