Lab 13: Linked List

In this lab, you will write a program that manipulates Linked List. 

Author:      Hong Wang

Lab:         Thursday 2pm

Program:     Lab 13: Linked List

Available commands:

  insert <CHARACTER> <FREQUENCY>

  undo

  exit

Current linked list:

$ insert a 123

Current linked list:

[a/123]

$ insert b 2345

Current linked list:

[b/2345] -> [a/123]

$ insert x 777

Current linked list:

[x/777] -> [b/2345] -> [a/123]

$ undo

Current linked list:

[b/2345] -> [a/123]

$ undo

Current linked list:

[a/123]

$ insert x 999

Current linked list:

[x/999] -> [a/123]

$ exit

Example:

[x/777] -> [b/2345] -> [a/123]

References:

Submission: