Assignment 1
Assignment 1
(July-November, 2011):
Assignment 1
Due:31st August, 2010
1. Write code for creating a linked list, adding elements to the linked list
at the tail, searching for an element with a particular key and also
deleting an element with a particular key if it exists.
2. Write a code for implementing a stack, a queue, and a queue simulated
by two stacks and a stack simulated by two queues, all using prespecified size arrays. You need to implement the push, pop, enqueue,
dequeue operations and error checks.
3. Implement stacks and queues using the linked list data-structure.
4. Write code to translate an arbitrary rooted tree into a binary tree,
using the left-child, right-sibling representation.
5. Write code for reversing a singly linked list.
6. Implement Binary Search.
7. Implement insertion sort, merge sort, quick sort and heap sort routines.
8. Implement the various routines of the binary heap data structure for
priority queues.