PostOrder

Doubly Linked Lists

void dll_print(struct doublylinked *dll) {
  for(struct dllnode *current = dll->front;
      current != NULL; current = current->next){
  printf("[%d]->", current->item);
  }
  printf("NULL\n");
}

void dll_reverse(struct doublylinked *dll) {
  struct dllnode *temp = dll->front;
  dll->front = dll->back;
  dll->back = temp;
  for(struct dllnode *current = dll->front;
      current != NULL; current = current->next){
    struct dllnode *temp = current->next;
    current->next = current->prev;
    current->prev = temp;
  }
}
Tutorial 11 | Home