The document outlines an assignment on Data Structures, covering various topics such as classifications of data structures, algorithms, asymptotic notations, recursion, and specific problems related to arrays and queues. It includes questions on performance analysis, time and space complexity, as well as algorithms for stack and queue operations. Additionally, it discusses collision in hashing and compares different sorting algorithms.
The document outlines an assignment on Data Structures, covering various topics such as classifications of data structures, algorithms, asymptotic notations, recursion, and specific problems related to arrays and queues. It includes questions on performance analysis, time and space complexity, as well as algorithms for stack and queue operations. Additionally, it discusses collision in hashing and compares different sorting algorithms.
Q.1 Give the classification of data structure. Explain linear and non- linear data structure with example.
Q.2 What is Algorithm? Explain properties and Design tools of
algorithm? Write short note on performance analysis and performance measurement of an algorithm.
Q.3 Explain asymptotic notations with example. Define Time
complexity and Space complexity. Calculate time complexity for given expression.
for (k=0; k<n; k++)
{ rows[k] = 0; for(j=0; j<n; j++) { rows[k] = rows[k] + matrix[k][j]; total = total + matrix[k][j]; } } Q.4 What is recursion? Explain Tower of Hanoi Problem with algorithm. Q.5 Solve following problems: I. Given a two dimensional array Z1(2:9, 9:18) stored in column-major order with base address 100 and size of each element is 4 bytes, find address of the element Z1(4, 12). II. Consider array int a[3][4] declared in C program. if the base address is 1050 find the address of the element a[3][2] with row major & column major representation. Q6. Write a pseudocode for PUSH and POP operations of stack Q7. What is Queue? Write an algorithm to implement insert and delete operation into a Simple Queue using array representation of Queue Q8. Explain types of Queue? Compare Simple Queue and Circular Queue. Write an algorithm to implement insert and delete operation into a Double Ended Queue using array representation of Queue. Q9. Explain collision in the context of hashing? Discuss collision resolution techniques Q10 Discuss the time complexity of sorting algorithms: • Bubble Sort • Insertion Sort • Selection Sort • Merge Sort • Quick Sort Q11. Write the algorithm for binary search and discuss its efficiency. Q12. Define the following: • Data Structure • Circular Queue • Hashing • Array