#include <stdlib.h>
#include "dlist.h"
 
Go to the source code of this file.
◆ DlAddNodeToHead()
Add a node to the list head. Runs in O(1) time.
- Parameters
 - 
  
    | Head | A pointer to the existing list head.  | 
    | Node | A pointer to the node you are adding.  | 
  
   
Definition at line 68 of file dlist.c.
 
 
◆ DlAddNodeToTail()
Add a node to the list tail. Runs in O(1) time.
- Parameters
 - 
  
    | Head | A pointer to the existing list head.  | 
    | Node | A pointer to the node you are adding.  | 
  
   
Definition at line 75 of file dlist.c.
 
 
◆ DlInsertNodeAfter()
Inserts a new node into the list right after the marker element. Runs in O(1) time.
- Parameters
 - 
  
    | Marker | The node you are inserting after. Cannot be NULL.  | 
    | Node | The node you are inserting. Cannot be NULL.  | 
  
   
Definition at line 44 of file dlist.c.
 
 
◆ DlInsertNodeBefore()
Inserts a new node into the list right before the marker element. Runs in O(1) time.
- Parameters
 - 
  
    | Marker | Node you are inserting before. Cannot be NULL.  | 
    | Node | The node you are inserting. Cannot be NULL.  | 
  
   
Definition at line 61 of file dlist.c.
 
 
◆ DlRemoveNode()
Removes a node from the list. Runs in O(1) time.
- Parameters
 - 
  
    | Node | The node you are removing.  | 
  
   
Definition at line 82 of file dlist.c.
 
 
◆ DlRemoveNodeFromHead()
Removes the node from the list head. Runs in O(1) time.
- Parameters
 - 
  
    | Head | A pointer to the existing list head.  | 
  
   
- Returns
 - The node removed, or NULL for an empty list. 
 
Definition at line 92 of file dlist.c.
 
 
◆ DlRemoveNodeFromTail()
Removes the node from the list tail. Runs in O(1) time.
- Parameters
 - 
  
    | Head | A pointer to the existing list head.  | 
  
   
- Returns
 - The node removed, or NULL for an empty list. 
 
Definition at line 112 of file dlist.c.