• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Singly Linked List

 
Emanuel Mensa
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am learning about singly linked list now. i really don't get the idea. so i started searching online and found this:

http://www.brpreiss.com/books/opus4/html/page88.html

there it mentions "head" and "tail". would i be right to assume head is the first element in the list and "tail", the last element?

any clarification would be appreciated.
 
Tony Docherty
Bartender
Posts: 2965
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there it mentions "head" and "tail". would i be right to assume head is the first element in the list and "tail", the last element?

Yes that is correct.
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The concept of a LinkedList is that there are nodes which have 2 parts to them. One part is the data at that node and the other part is the reference to the next node. Read this article.
 
Emanuel Mensa
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks @Tony Docherty, that cleared things up for me
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic