hahaha
my linked list page is 2 BBS posts so far
ive just finished on adding items
i have a simple theory behind it with a diagram of its structure
then detailed commenting and explanations of code for
an overloaded [] with one parameter for acessing the 'n'th item in list
push() //for adding an item to end
push(num) //for adding 'num' number of items to end
unshift() // for adding an item at start
unshift(num) // for adding 'num' number of items at start
splice(pos) // for adding an item at 'pos'
splice(pos,num)// for adding 'num' number of items at 'pos'
i also have it in a class named Array (go Flash!) with a length variable for the current number of items in the list
lol....
now i need to do deletion of items (which will also change the splice functions)
to splice(pos,deletenum,createnum) so that its used for deleting and adding (like in flash)
Link to image
lol at my diagram, that is to show the structure of a linked list
i even have a hint of directives for defining NULL as 0 if it isnt already defined
at the end im going to have a bit on how the thing as a whole can be improved
i.e. having not just a pointer to the first item in class, but also to the last pointer, and second last pointer
and then a bit on using the linked list
(like getting around its disadvantage of slow random access when you are just looping through the whole thing)
then maybe a bit on other operations like sorting and reversing :p looong tut
i think at the end ill just link to my class with all the functions