## Guess Paper 1: Data Structures Fall – 2020 Past Papers

Time Allowed: __3 hours__

Total Marks: __70, Passing Marks (35)__

Q.1 Multiple Choice Questions (MCQs).

i. The situation when in a linked list START=NULL is ….

a. Underflow b. Overflow c. Houseful d. Saturated

ii. The operation of processing each elements in the list is known as……

a. sorting b. merging c. inserting d. traversal

iii. Which of the following is non-liner data structure?

a. Stacks b. List c. Strings d. Trees

iv. Stack is also Called as

a. Last in first out b. First in last out c. Last in last out d. First in first out

v. ………… is not the component of data structure.

a. Operations b. Storage Structures c. Algorithms d. None of above

Q.2 Define Queue and explain insertion, deletion and searching operations in the queue by giving an example.

Q.3 What is a Binary Search Tree (BST)? Make a BST for the following sequence of numbers.

45, 36, 76, 23, 89, 115, 98, 39, 41, 56, 69, 48

Traverse the tree in Preorder, Inorder and postorder.

Q.4 Write short note on linked list. Explain application of linked list.

Q.5 What is quick sort? Sort the following array using quick sort method.

24 56 47 35 10 90 82 31

Q.6 Define a stack. Describe ways to implement stack.

Q.7 Write a short note on abstract data type. Explain the properties of algorithm.

Q.8 Write short notes on any Two:-

(i) B Tree.

(ii) Time Complexity, Big O notation.

(iii) Merge Sort.

(iv) Depth First Traversal.

## Guess Paper 2: Data Structures Spring – 2020 Past Papers

Time Allowed: __3 hours__

Total Marks: __70, Passing Marks (35)__

Q.1 Multiple Choice Questions (MCQs).

1. Two dimensional arrays are also called

a. table arrays b. matrix arrays c. both of above d. none of above

2. Binary search algorithm cannot be applied to

a. sorted linked list b. sorted binary trees c. sorted linear array d. pointer array

3. When new data are to be inserted into a data structure, but there is no available space; this situation is usually called

a. underflow b. overflow c. Housefull d. saturated

4. The term “push” and “pop” is related to the

a. array b. lists c. stacks d. all of above

5. A data structure where elements can be added or removed at either end but not in the middle is called

a. Linked lists b. Stacks c. Queues d. Deque

Q.2 Define Queue and explain insertion, deletion and searching operations in the queue by giving an example.

Q.3 What is Arithmetic expressions? Explain infix, postfix and prefix notations with the help of examples.

Q.4 What is a dynamic data structure? Briefly explain Linked list as a dynamic data structure. Explain search, insertion and deletion operation from a linear linked list with the help of example and pseudocode.

Q.5 What is Tree? Explain binary tree by giving example in detail.

Q.6 What is sorting? Explain Merge or Insertion sort algorithm and its complexity.

Sort the following array using merge/insertion sort.

Q.7 Write short notes on any two of the following:

a) Binary search tree

b) Multi Dimensional Arrays

c) Recursion

d) Heap

## Guess Paper 3: Data Structures Spring – 2019 Past Papers

Time Allowed: __3 hours__

Total Marks: __50__

Q1: (Marks 6)

Explain the Perfect Binary Tree, Balanced Binary Tree, degenerate (or pathological) tree with the help of examples.

Q2:

Implement the doubly link list and show the insertion and deletion in double link list. (Marks 6)

Q3: (Marks 6)

Write the code in C++ to insert a node at the end in a single link list.

Q4: (Marks 6)

Write the code in C++ to find a value from the queue.

Q5: (Marks 6)

What is Binary search tree. Write the code in C++ to insert the (Marks 6)

values in a BST.

Q4: (Marks 10)

Write the code in C++ in which user enter a value and program will find the value from the doubly link list.

Q5: (Marks 10)

Explain your semster project in maximum 50 words.

- List of Public service commissions - August 31, 2020
- Comparison of fee structure of Pakistani Universities - June 1, 2020
- Past Guess Paper of Auditing - May 12, 2020