Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

help me with java linkedList problem!

Thread view: 
perl.jsp@gmail.com - 12 Jun 2006 15:39 GMT
there are a few sentences on how to insert a node into a
linkedList,delete a node from a linkedList:
1.insert a node at the beginning of a linkedList:
NewList.Next[NewNode]=Pointer
HEAD=NewNode
2.insert a node into the middle of a linkedList:
NewList.Next[NewNode]=NewList.Next[Pointer]
NewList.Next[Pointer]=NewNode
3. insert a node at the tail of linkedList:
NewList.Next[NewNode]=NewList.Next[Pointer]
NewList.Next[Pointer]=NewNode

delete a node from a linkedList:
1.delete a node from the beginning of a linkedList:
Header=NewList.Next[Pointer];
NewList.Next[Pointer]=-2;
2.delete a node from the middle of a  linkedList:
NewList.Next[Back]=NewList.Next[pointer];
NewList.Next[Pointer]=-2;
3.delete a node from the tail of a linkedList;
NewList.Next[Back]=NewList.Next[pointer];
NewList.Next[Pointer]=-2;
i can't understand the text above. i just copy it from my book. can
someone give me some explanation about the above text. thanks in
advance.
Oliver Wong - 12 Jun 2006 16:48 GMT
> there are a few sentences on how to insert a node into a
> linkedList,delete a node from a linkedList:
[quoted text clipped - 21 lines]
> someone give me some explanation about the above text. thanks in
> advance.

   I'm having trouble understanding the above text as well. I don't know
what the -2 literal is supposed to mean, for example.

   If you want to understand what Link Lists are and how they work, you
might want to read this Wikipedia article:

http://en.wikipedia.org/wiki/Linked_list

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.