GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Linked Lists WedW15

Neyavanan v Englisch

Inhalt der Mindmap

Linked Lists WedW15

  1. Composed of nodes

    • Nodes contain data
    • Nodes contain pointer to nxt node
    • typedef struct node{ int data; struct node * next;}NODE;
    • Saved in the heap
      • NODE* p = malloc(sizeof(NODE));
      • free(p);
      • assert(p!=NULL);
  2. add nodes

    • add to front
      • newNode->next= head; head = newNode;
    • add to back
    • add to middle
  3. delete nodes

    • delete front
    • delete middle
    • delete last
    • delete all
  4. traverse a list

    • modify/set values
    • append (see add node)
    • counting nodes (length)
    • search for value
    • sum, average, math
    • # of occurances
  5. Always starts with head

    • head == NULL the list is empty
    • head != NULL list is occupied
  6. Always end with NULL

    • if(p->next == NULL) p is point to the last node (p is tail)
      • found the end of the list (see append)
    • if(p == NULL)
      • traverse through whole list

Informationen

Beschreibung
A quick mind map summarizing the ideas associated with linked lists that is progressively adapted as the course continues.
Erstellt von
Neyavanan v
Aufrufe
5
Verlauf
  • Erstellt von Madeline Harlow · 2 Mär 2015
  • Kopiert von Neyavanan v · 12 Sep 2019
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck