Write code to implement :
1) A circular doubly linked list (support forward traversal, reverse traversal, insertion and deletion operations)
2) A stack using an array

Write pseudocode for :
3) Selection sort
4) Insertion sort
5) Quicksort (choose the pivot element randomly)

6) If each element is involved in at most a constant number of inversions, then what is the running time of bubble sort for an array containing n such elements? Why?
7) Give suitable Huffman codes (draw the Huffman tree) when the following characters occur in a piece of text with the indicated relative frequencies:

A 26
B 21
C 7
D 12
E 35
F 14
G 9
H 8
I 22
J 6
K 11
L 9
M 18
N 14
O 28
Available from: Wednesday, 24 June 2009, 3:00 PM
Due date: Monday, 29 June 2009, 11:30 AM