master
1#include "doubly_linked_list.h"
2#include <stdio.h>
3#include <stdlib.h>
4
5int next(void) { return rand() % 100; }
6
7int main(int argc, char *argv[]) {
8 printf("=== COMP-272 - Assignment 1 - Question 5 ===\n");
9
10 Node *head = initialize(0);
11
12 for (int i = 0; i < 10; i++)
13 add(head, i);
14
15 printf("Before:\n\t");
16 inspect(head);
17
18 printf("Reversing...\n");
19 head = reverse(head);
20
21 printf("After:\n\t");
22 inspect(head);
23
24 return 0;
25}