Mar-05-2019, 03:43 PM
Using list as a variable name is a bad idea. list is a built-in, and by using it as a variable name, you block the use of the built-in, which could cause errors in other code.
Let's say your linked list is called llist. llist is actually the first item in you list, and it links to the next item in the list. The second item in the list is llist.next. Can you see then how to make the first item in your list be the second item in your list, thus deleting the previous first item?
Let's say your linked list is called llist. llist is actually the first item in you list, and it links to the next item in the list. The second item in the list is llist.next. Can you see then how to make the first item in your list be the second item in your list, thus deleting the previous first item?
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures