0% found this document useful (0 votes)
17 views1 page

Data Structures (IT205) (July-November, 2012) : Assignment 1 Due:10 August, 2012

This document outlines an assignment for a data structures course due on August 10th, 2012. It includes 5 programming tasks: 1) creating a linked list and adding, searching, and deleting elements, 2) implementing stacks and queues using arrays, 3) implementing stacks and queues using linked lists, 4) reversing a singly linked list, and 5) exchanging/reversing elements in stacks and queues using auxiliary data structures.

Uploaded by

vonih
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Data Structures (IT205) (July-November, 2012) : Assignment 1 Due:10 August, 2012

This document outlines an assignment for a data structures course due on August 10th, 2012. It includes 5 programming tasks: 1) creating a linked list and adding, searching, and deleting elements, 2) implementing stacks and queues using arrays, 3) implementing stacks and queues using linked lists, 4) reversing a singly linked list, and 5) exchanging/reversing elements in stacks and queues using auxiliary data structures.

Uploaded by

vonih
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Data Structures (IT205)

(July-November, 2012):
Assignment 1
Due:10st August, 2012

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 prespec-
ified 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 for reversing a singly linked list.

5. (a) Implement routines for exchanging two elements of a stack. You


may use two extra stacks for temporary storage.
(b) Implement a routine for reversing a contiguous subsequence of a
stack of elements. Again you may use two auxilliary stacks for
temporary storage.
(c) Write a routine for exchanging two elements of a queue using two
extra queues for temporary storage.
(d) Write routine for reversing a subsequence of contiguous elements
of a queue, using two auxilliary queues.

You might also like