Site pages

Current course

Participants

General

3 June - 9 June

10 June - 16 June

17 June - 23 June

24 June - 30 June

1 July - 7 July

8 July - 14 July

15 July - 21 July

22 July - 28 July

29 July - 4 August

5 August - 11 August

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

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 |