| | |
linked list..quick question
![]() |
check any of the thousands of explanations on how to implement a linked list that exist.
Basically just point the element before the one that is to be deleted to the one that the element you're deleting is pointing to and set the pointer in that element to null.
or something like that, my pointer code in C is a bit rusty.
Basically just point the element before the one that is to be deleted to the one that the element you're deleting is pointing to and set the pointer in that element to null.
Java Syntax (Toggle Plain Text)
typedef struct ll { int val; ll *next; } ll *list; void addElement(int el) { } void deleteElement(int pos) { // find position // ... ll element = (listCopy->next)*; ll delElement = (element->next)*; element.next = delElement.next; delElement.next = null; }
or something like that, my pointer code in C is a bit rusty.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
- Minimal element in a linked list? (Computer Science)
- Circular linked list (C)
- linked list question (C)
- remove method linked list (C)
- Linked List & Objects (C++)
- "doubly linked list" question (C)
Other Threads in the Java Forum
- Previous Thread: Linkedlist Troubles...plz Help
- Next Thread: how to perform calculation
| Thread Tools | Search this Thread |
911 actionlistener addball addressbook android applet application apps array automation binary bluetooth businessintelligence button card character class client code collision component consumer crashcourse css csv database desktop eclipse ee error fractal free ftp game givemetehcodez graphics gui html image integration j2me japplet java javaarraylist javac javadoc javaee javafx javaprojects jni jpanel julia jvm linked linux loan mac method migrate mobile netbeans objects online oriented phone physics printf problem program programming project projects radio recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server service set sms software sort sql swing test textfield textfields threads time tree trolltech ubuntu update utility windows






