Sunteți pe pagina 1din 3

ALLAMA IQBAL OPEN UNIVERSITY, ISLAMABAD

(Department of Computer Science)


WARNING
1. 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.
2. SUBMITTING ASSIGNMENTS BORROWED OR STOLEN FROM
OTHER(S) AS ONE’S OWN WILL BE PENALIZED AS DEFINED IN
“AIOU PLAGIARISM POLICY”.
Course: Data Structure (3408) Semester: Spring, 2010
Level: Graduate Total Marks: 100
Pass Marks: 40
ASSIGNMENT No. 1
Note: All questions carry equal marks.

Q.1 (a) What are the linear and non-linear data structures? Describe the
characteristics of each data structure with detail.
(b) Why analysis of algorithm is required? (20)

Q.2 (a) Briefly describe the complexity of an algorithm and space-time trade off of an
algorithm.
(b) Explain the types of sparse matrices. (20)

Q.3 (a) Give a brief description of following operations.


i) Searching ii) Sorting iii) Insertion iv) Deletion
(b) Discuss the impact of these operations on linear data structures. (20)

Q.4 (a) How two dimension arrays is stored in memory. Discuss arrays ordering and
their representation in memory.
(b) Write a program which performs the insertion, deletion and traversing
operations on a linear array.
(c) Explain Recursion and Iteration. (20)

Q.5 (a) 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)
(b) Write down the daily life examples of stack (at least 5).
(c) Write a program to implement a stack. (20)
ASSIGNMENT No. 2
Total Marks: 100 Pass Marks: 40

Note: All questions carry equal marks.

Q.1 Differentiate the following terms:


i) DQueues & priority Queues
ii) Overflow & underflow (Queues, 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.2 (a) Compare the following sorting techniques. Write down their advantages and
disadvantages.
i) Insertion sort ii) Selection sort
iii) Bubble sort iv) Quick Sort
(b) Write a program to implement any two sorting techniques. (20)

Q.3 (a) An expression Q is given below.


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.
(b) Define the following terms:
i) Left Successors ii) Terminal nodes iii) Sibling nodes
iv) Ancestors v) Similar trees (20)

Q.4 (a) Explain the concept and importance of graph. Also describe various types of
graphs.
(b) Traverse & inspect each step by hand to sort the following array using quick
sort algorithm. (20)
15 27 13 55 11 75 43 8 20 50

Q.5 (a) Write a program which implements the operations of searching, insertion and
deletion in binary search tree.
(b) Briefly describe heap sort. (20)

2
3408 Data Structure Credit Hours: 4 (4+0)
Recommended Book:
Introduction to Data Structure with Application by Paul Trembley Sorenson

Course Outlines:
Unit No. 1 Introduction
Basic Terminologies, Introduction to Data Structures, Data Structure
(Classification, Types, Operation), Basics of Algorithms, Notation used,
Importance of Algorithms for Optimized Application Development, Introduction to
Analysis of Algorithms

Unit No. 2 Arrays


Arrays (Definition and Examples), Representation of array in Memory, Accessing
& Traversing Array, Inserting & Deleting, Multi Dimensional Arrays & their
Representation in Memory

Unit No. 3 Stacks


Stack, Importance of Stack, Array Representation of Stacks, Stack Operations
(PUSH and POP operations), Infix, Postfix and Prefix Expressions

Unit No. 4 Queues


Queue, Representation of Queues, Operation Perform on Queue (Inserting and
Removing Nodes), De-queues, Priority queues

Unit No. 5 Linked Lists


Linked Lists Concept, Representation of Linked Lists in Memory, Traversing &
Searching a Lined List Insertion & Deletion in Linked List, types of Linked Lists

Unit No. 6 Trees


Tree, Tree Types (simple, Binary, General), Representation of Binary Tree in
Memory, Traversing (Pre order, In order), Basic Operation (Insertion Deletion)

Unit No.7 Sorting & Searching


Bubble Sort, Quick Sort, Insertion Sort, Selection Sorting, Sequential Search,
Binary Search

Unit No. 8 Graphs


Graph Theory Terminology, Linked Representation of Graphs, Directed and
Undirected Graphs, Traversal Methods

Unit No. 9 Files and Data Storage


Basic Operations on Different Files Organizations, Add, Update and Delete
Record, File Organizations, Sequential, Indexed Sequential, Direct (Hashing),
Merging Files
3

S-ar putea să vă placă și