Giter Site home page Giter Site logo

Comments (3)

polarkernel avatar polarkernel commented on August 18, 2024 1

Maybe I misunderstood it. I thought it's like in the train. The tail is at the end of the train and the head is at the beginning, so the train driver is in the head of the train.

As far as I understand it, it is the same with trains. When the driver is at the head of the train, the cars behind him (its successors) are linked as a single linked list, while the last one has no successor. New cars are added at the end (the tail) of the train. Since finding the end of a linked list requires traversing the entire list, which is not the case for a train, the tail is used to find the end more quickly. Predecessor links enable moving in both directions in the list, which is not required with a train. Almost all implementations of doubly-linked lists, that I know of, use this notation.

from blosm.

polarkernel avatar polarkernel commented on August 18, 2024

Everything is OK, it's a Street with a SideLane in the linked list:

street.tail = Section s2
street.head = Section s1
street.tail.succ = s2.succ = None
street.tail.pred = SideLane sl2

Please use lower case letters for id, Street.ID is the class variable, that counts the sum of instances of the class.

from blosm.

vvoovv avatar vvoovv commented on August 18, 2024

Maybe I misunderstood it. I thought it's like in the train. The tail is at the end of the train and the head is at the beginning, so the train driver is in the head of the train.

from blosm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.