lesser-equity

Magazine
Go Back   Computer Juice > Computer Software > General Software Chat


Register


Reply
 
Thread Tools
  #1  
Old 31st May 2009, 02:04
New Member Group
 
I am having some problems with writing a C program to generate a linked list from 0 to 9 and be able to INSERTE and DELETE from it. Say delete 5; and inserte 11 between the created linked list
  #2  
Old 1st Jun 2009, 06:41
MJM
Donor Group
 
Google. C++ LL. That's more detailed than I think it needs to be.

Look at the delete beginning node and delete end node functions. A combination of both does a general delete. Find the node you want to delete. use the begin node delete method on it. Find the node before the node (it's the one that points to this one as next) that you want to delete (one way link list means search from beginning) and make it point to the new next node.

Insert is easy. Find where you want to insert. Create the new node. Make node before insertion point to it, make new node point to what the before node pointed to before.

Done.
__________________

My System: Toshiba Satellite A200-28P

Processor(s):
Intel Core 2 Duo T8100
Motherboard:
Mobile Intel PM965 Express Chipset
RAM Memory:
1024 + 2048MB DDR2 667
Graphics Card(s):
ATI HD 2600 XT
Sound Card:
Toshiba Bass Enhanced Sound System
Hard Drive(s):
200GB 5400RPM
Optical Drive(s):
DVD Super Multi
Case / PSU:
Satellite A200 Series
Cooling:
Stock
Network / Internet:
Intel 4965AGN
Monitor(s):
15.4" 1,280x800 Toshiba TruBrite
Operating System(s):
Windows Vista SP1 / Fedora i386
Reply

Register
Thread Tools




Arabic Bulgarian Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Latvian Lithuanian Norwegian Polish Portuguese Romanian Russian Serbian Slovak Spanish Swedish Thai Turkish Ukrainian

Copyright ©2006 - 2009 Computer Juice.

Powered by vBulletin® Copyright ©2000 - 2009 Jelsoft Enterprises Ltd. SEO by vBSEO ©2009, Crawlability, Inc.