# ALLAMA IQBAL OPEN UNIVERSITY, ISLAMABAD (Department of Computer Science) WARNING

1.

2. PLAGIARISM OR HIRING OF GHOST WRITER(S) FOR SOLVING THE ASSIGNMENT(S) WILL DEBAR THE STUDENT FROM AWARD OF DEGREE/CERTIFICATE, IF FOUND AT ANY STAGE. SUBMITTING ASSIGNMENTS BORROWED OR STOLEN FROM OTHER(S) AS ONE’S OWN WILL BE PENALIZED AS DEFINED IN “AIOU PLAGIARISM POLICY”. Semester: Spring, 2010 Total Marks: 100 Pass Marks: 40

Course: Data Structure (3408) Level: Graduate

ASSIGNMENT No. 1

Note: All questions carry equal marks. Q.1 (a) (b) Q.2 (a) (b) Q.3 (a) (b) Q.4 (a) (b) (c) Q.5 (a) What are the linear and non-linear data structures? Describe the characteristics of each data structure with detail. Why analysis of algorithm is required? (20) Briefly describe the complexity of an algorithm and space-time trade off of an algorithm. Explain the types of sparse matrices. (20) Give a brief description of following operations. i) Searching ii) Sorting iii) Insertion iv) Deletion Discuss the impact of these operations on linear data structures.

(20)

How two dimension arrays is stored in memory. Discuss arrays ordering and their representation in memory. Write a program which performs the insertion, deletion and traversing operations on a linear array. Explain Recursion and Iteration. (20) Convert the following infix expressions into equivalent prefix and postfix expressions (write down all the steps of conversion). i) (A * B ↑ C) / (D + E * F) – G ii) A * (B + E) / J + K * (M + N/Y)

Traverse & inspect each step by hand to sort the following array using quick sort algorithm.4 (a) (b)
Q. Define the following terms: i) Left Successors ii) Terminal nodes iii) Sibling nodes iv) Ancestors v) Similar trees (20) Explain the concept and importance of graph.3 (a)
Compare the following sorting techniques. (20) 15 27 13 55 11 75 43 8 20 50 Write a program which implements the operations of searching.5 (a) (b)
2
. insertion and deletion in binary search tree. (20)
(b)
Q. Write a program to implement a stack. Also describe various types of graphs. 2
Total Marks: 100 Note: All questions carry equal marks. (20) An expression Q is given below. i) Insertion sort ii) Selection sort iii) Bubble sort iv) Quick Sort Write a program to implement any two sorting techniques. Q.
(20) Pass Marks: 40
ASSIGNMENT No.2 (a)
(b) Q. link list) iii) Circular & grounded header link list iv) One way & two way link list v) Extended binary tree and Complete Binary tree
(20)
Q.(b)
(c)
Write down the daily life examples of stack (at least 5).1 Differentiate the following terms: i) DQueues & priority Queues ii) Overflow & underflow (Queues. Write down their advantages and disadvantages. Briefly describe heap sort. Q = (A + B / C) * D + (F + K * O) – Z Do the following: i) Construct a Binary tree ii) Perform pre order and post order traversal of the binary tree.

Tree Types (simple. Multi Dimensional Arrays & their Representation in Memory Unit No. Basic Operation (Insertion Deletion) Unit No. Operation). 6 Trees Tree. Types. Representation of Binary Tree in Memory. Add.3408 Data Structure
Credit Hours: 4 (4+0)
Recommended Book: Introduction to Data Structure with Application by Paul Trembley Sorenson Course Outlines: Unit No. Postfix and Prefix Expressions Unit No. Representation of Linked Lists in Memory. Stack Operations (PUSH and POP operations). Sequential. Importance of Algorithms for Optimized Application Development. Inserting & Deleting. Operation Perform on Queue (Inserting and Removing Nodes). Array Representation of Stacks. General). Importance of Stack. Direct (Hashing). 4 Queues Queue. Selection Sorting. 1 Introduction Basic Terminologies. 5 Linked Lists Linked Lists Concept. Binary Search Unit No. File Organizations. Merging Files
3
.7 Sorting & Searching Bubble Sort. 9 Files and Data Storage Basic Operations on Different Files Organizations. Introduction to Analysis of Algorithms Unit No. Notation used. In order). Accessing & Traversing Array. Representation of Queues. De-queues. types of Linked Lists Unit No. Traversing & Searching a Lined List Insertion & Deletion in Linked List. Representation of array in Memory. 8 Graphs Graph Theory Terminology. Quick Sort. 3 Stacks Stack. Indexed Sequential. Data Structure (Classification. Linked Representation of Graphs. Insertion Sort. Directed and Undirected Graphs. Update and Delete Record. Traversal Methods Unit No. Priority queues Unit No. Infix. Traversing (Pre order. 2 Arrays Arrays (Definition and Examples). Sequential Search. Introduction to Data Structures. Basics of Algorithms. Binary.