Linked List (2)

  1. The previous exercise for linked list stores the element in an order which is reverse to the order as numbers are input to your program.
  2. Modify your program so that data are saved in an order which is consistent with the input order.
  3. You don't need to change the printList() function, but you may replace addFront() with addBack().

The program may run as:

1
2
3
4
5
6
7
0
1234567