• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Linked List operation

 
Timothy Leong
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
what are the operations of a linked list can performed?

1) Add new node
2) Delete node
3) Sorting
4) Search


any more tt requires the manipulation of linked list?
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out

http://java.sun.com/j2se/1.4.2/docs/api/java/util/LinkedList.html

You can add whole collections, remove parts or get sublists of your list.

addAll
removeRange
subList

Hope that helps
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need to implement your own linked list class for a homework assignment, you should read your textbook. It should contain a thorough list of the basic operations you can perform on a linked list. If it doesn't, you should return it and ask your professor to use a better book.

Layne
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic