Skip to content
SmartFigureEduExam kits ₹19

AD3251 · 5 papers compared

AD 3251 Data Structures Design important questions

AD3251 exam kitRepeated questions + all papers, 1 PDF

Exam kit

Needed by the payment gateway. Not shared or used for marketing.

Secure payment by Cashfree Payments (UPI, cards, net banking). One-time payment, no subscription. The payment page may show StrangerYaar, the business that processes payments for SmartFigure.Terms · Refunds

ANNA UNIVERSITY · REGULATION 2021

Important Questions

AD 3251 — DATA STRUCTURES DESIGN

Second Semester · Artificial Intelligence and Data Science

Prepared from 5 previous year question papers (Apr/May 2024, Nov/Dec 2023, Apr/May 2023, Nov/Dec 2022, Apr/May 2022). Every question was compared with the others of its unit; the ones asked more than once come first. "Most asked topics" shows in how many different exams a syllabus topic had a question.

UNIT 1Abstract Data Types

Most asked topics: shallow and deep copying (3/5) · classes in Python (2/5) · inheritance (2/5) · asymptotic notations (2/5) · recursion (1/5)

Part A · 2 marks

  1. 1.
    What are the various object oriented principles?

    Asked in Apr/May 2024

    (2)
  2. 2.
    Analyze the following code to predict and solve the recurrence relation to find time complexity. procedure whirlpool(m) begin if (m <= 0) then print ("eddy!"); exit( ); else swirl=whirlpool(m-1) + whirlpool(m-1); print("whirl"); end whirlpool

    Asked in Apr/May 2024

    (2)
  3. 3.
    Define data structures and how the data types are classified at the higher level.

    Asked in Nov/Dec 2023

    (2)
  4. 4.
    What is recursion in data structure?

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    What is ADT, give examples?

    Asked in Apr/May 2023

    (2)
  6. 6.
    What is an Algorithm? How to compute its time complexity?

    Asked in Apr/May 2023

    (2)

Part B · 13 marks

  1. 1.
    Suppose you are on the design team for new e-book reader. What are the primary classes and methods that the Python software for your reader will need? Draw an inheritance diagram for this and implement it. Your software architecture should at least include ways for customers to buy new books, view their list of purchased books, and read their purchased books.

    Asked in Apr/May 2024

    (13)
  2. 2.
    Given an unsorted sequence, S, of integers and an integer k, describe a recursive algorithm for rearranging the elements in S so that all elements less than or equal to k come before any elements larger than k. What is the running time of your algorithm on a sequence of n values?

    Asked in Apr/May 2024

    (13)
  3. 3.
    (i) Explain the Asymptotic Notations in detail and their types with a suitable example program. (ii) Write a short note on the namespace in python and its types.

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    (i) Discuss the shallow and deep copying and differentiate its pros and cons. (ii) Explain in short about python classes and objects.

    Asked in Nov/Dec 2023

    (13)

UNIT 2Linear Structures

Most asked topics: List ADT (3/5) · Stack ADT (3/5) · Queue ADT (3/5) · singly linked lists (2/5) · doubly linked lists (2/5) · linked list implementations (1/5)

Part A · 2 marks

  1. 1.
    Give the advantages of double ended queues.

    Asked in Apr/May 2024

    (2)
  2. 2.
    Implement a function that counts the number of nodes in a circularly linked list.

    Asked in Apr/May 2024

    (2)
  3. 3.
    Find the Abstract Data Type in linked lists that has no NULL links, Justify.

    Asked in Nov/Dec 2023

    (2)
  4. 4.
    List the applications of Stack ADT concerning computing systems.

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    How double ended queue is different from circular queue?

    Asked in Apr/May 2023

    (2)
  6. 6.
    What is Stack ADT? List its operations.

    Asked in Apr/May 2023

    (2)

Part B · 13 marks

  1. 1.
    You are given a linked list, L, and another list, P, containing integers sorted in ascending order. The operation printLots(L,P) will print the elements in L that are in positions specified by P. For instance if P = 1, 3, 4, 6 the elements in positions 1,3,4 and 6 in L are printed. Write the procedure printLots(L,P). What is the running time of your procedure?

    Asked in Apr/May 2024

    (13)
  2. 2.
    How does a circular queue differ from a linear queue? Explain the algorithms to perform primitive operations of a circular queue.

    Asked in Apr/May 2024

    (13)
  3. 3.
    (i) Write a program to traverse a doubly linked list using only one space for the address field with every node. (ii) Explain the list ADT with an example.

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    (i) What is stack ADT and what are the various operations on Stack? Write the python program to perform its operation. (ii) What is Queue ADT and what are the various operations on Queue?

    Asked in Nov/Dec 2023

    (13)

UNIT 3Sorting and Searching

Most asked topics: hashing (5/5) · Bubble sort (3/5) · binary search (3/5) · selection sort (2/5) · insertion sort (2/5) · quick sort (2/5)

Part A · 2 marks

  1. 1.
    Write down the time complexing of Binary Search.

    Asked in Apr/May 2024

    (2)
  2. 2.
    The keys 1,5,28,19,15,20, 33,12, 17, 10 are inserted into a hash table in which collision resolution is done by chaining. If the hash function, h(k) = k mod 4 and what is the length of the longest chain?

    Asked in Apr/May 2024

    (2)
  3. 3.
    What is recurrence for the worst case of QuickSort and what is the time complexity in the Worst case?

    Asked in Nov/Dec 2023

    (2)
  4. 4.
    What is the load factor in data structure?

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    What is Hashing? What is it's importance in data structures?

    Asked in Apr/May 2023

    (2)
  6. 6.
    What is sorting in data structure and explain why in-place sorting is better?

    Asked in Apr/May 2023

    (2)

Part B · 13 marks

  1. 1.
    Tamarindo Airlines wants to give a first-class upgrade coupon to their top log n frequent flyers, based on the number of miles accumulated, where n is the total number of the airlines' frequent flyers. The algorithm they currently use, which runs in O(n log n) time, sorts the flyers by the number of miles flown and then scans the sorted list to pick the top log n flyers. Describe an algorithm that identifies the top log n flyers in O(n) time.

    Asked in Apr/May 2024

    (13)
  2. 2.
    Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x) = x (mod ( ) 10), show the results for (i) separate chaining hash table with explanations (ii) hash table using linear probing with explanations (iii) hash table using quadratic probing with explanations (iv) hash table with second hash function h2(x) = 7 - (x mod 7)

    Asked in Apr/May 2024

    (13)
  3. 3.
    (i) Suppose we are sorting an array A[2 5 1 7 9 12 11 10] using Bubble sort. Give all the steps while sorting the array. What is the best and worst case time complexity of Bubble sort? (ii) Define hash function. How will you calculate the hash function using division.

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    (i) Suppose we are sorting an array A[ 5 4 1 10 18 15 11] using Insertion sort. Give all the steps while sorting the array. Calculate its best time and worst time complexity based on the given example. (ii) Derive the time complexity of the quick sort algorithm.

    Asked in Nov/Dec 2023

    (13)

UNIT 4Tree Structures

Most asked topics: tree traversals (5/5) · heaps (4/5) · AVL trees (3/5) · multi-way search trees (2/5) · binary search trees (1/5)

Part A · 2 marks

  1. 1.
    Define Heap in Data Structures. What are the properties of a heap?

    Asked 2 times: Nov/Dec 2023, Apr/May 2023

    (2)
  2. 2.
    The in order and pre order traversal of a binary tree are d b e a f c g and a b d e c f g. Give the post order traversal of the tree.

    Asked in Apr/May 2024

    (2)
  3. 3.
    Give some applications of multiway search tree.

    Asked in Apr/May 2024

    (2)
  4. 4.
    What is the difference between tree depth and height?

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    Define tree traversal and what is the time complexity of level order traversal?

    Asked in Apr/May 2023

    (2)
  6. 6.
    Convert the infix expression (A-B/C)*(D/E-F) into a postfix.

    Asked in Nov/Dec 2022

    (2)

Part B · 13 marks

  1. 1.
    Write a program to take N elements and do the following: (i) Insert them into a heap one by one. (ii) Build a heap in linear time and write the pseudocodes. (iii) Compare the running time of both algorithms for sorted, reverse-ordered, and random inputs.

    Asked in Apr/May 2024

    (13)
  2. 2.
    (i) Explain the significance of AVL trees over binary search trees in performing insertion and deletion operations. Write the general representations of AVL trees to execute LL, RL, L0, and R-1 operations. (ii) Consider the following AVL tree shown in Fig 14 (b). After inserting 15, delete 18 from the tree, and perform the required rotations to maintain the tree as balanced one. …

    Asked in Apr/May 2024

    (13)
  3. 3.
    The inorder and preorder traversal of a binary tree are "D B E A F C G" and "A B D E C F G", respectively. What would be the postorder traversal of the binary tree? Illustrate the steps.

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    Discuss about the AVL trees along with it's properties and advantages with suitable example.

    Asked in Nov/Dec 2023

    (13)

UNIT 5Graph Structures

Most asked topics: graph traversals (2/5) · shortest paths (2/5) · representations of graph (1/5) · topological ordering (1/5)

Part A · 2 marks

  1. 1.
    Does either Prim's or Kruskal's algorithm work if there are negative edge weights?

    Asked in Apr/May 2024

    (2)
  2. 2.
    What is topological ordering?

    Asked in Apr/May 2024

    (2)
  3. 3.
    Find the number of edges present in a complete graph having n vertices.

    Asked in Nov/Dec 2023

    (2)
  4. 4.
    Define Complete Graph and Finite Graph.

    Asked in Nov/Dec 2023

    (2)
  5. 5.
    What is a complete graph and represent k4 graph?

    Asked in Apr/May 2023

    (2)
  6. 6.
    How many edges at most can a Directed Acyclic Graph possess, with number of vertices greater than 1?

    Asked in Apr/May 2023

    (2)

Part B · 13 marks

  1. 1.
    Explain Depth first traversal algorithm on a graph and give its applications.

    Asked in Apr/May 2024

    (13)
  2. 2.
    Differentiate the minimum spanning tree obtained by using prim's and kruskal's algorithms with examples. Also compare the result of these two algorithms with time complexities.

    Asked in Apr/May 2024

    (13)
  3. 3.
    The adjacency matrix of a four-vertex graph is shown in below figure. List the sequence of nodes visited starting from vertex 4, in depth-first search on the graph. [Adjacency matrix with rows and columns A, B, C, D: A: 0 1 0 0; B: 1 0 1 0; C: 0 1 0 1; D: 0 0 1 0]

    Asked in Nov/Dec 2023

    (13)
  4. 4.
    Discuss in detail about the tree traversal with a suitable example and explain various tree traversals methods.

    Asked in Nov/Dec 2023

    (13)

PART CAny unit

Part C · 15 marks

  1. 1.
    Convert the given postfix expression ABC*+D/E-FQ* into a prefix and infix expressions and explain the procedure in detail. Illustrate the steps.

    Asked 2 times: Nov/Dec 2023, Apr/May 2023

    (15)
  2. 2.
    Consider the given undirected graph and apply Kruskal's Algorithm to find the minimum spanning tree. Illustrate the steps. [Figure: undirected graph with vertices A, B, C, D, E and edges A-B = 1, A-C = 7, B-C = 5, B-D = 3, B-E = 4, C-D = 6, E-D = 2]

    Asked 2 times: Nov/Dec 2023, Apr/May 2023

    (15)
  3. 3.
    (i) Construct a binary tree and binary search tree with the following data. 40,89,7,1,45,56,77,3,19,145,67,347,13,6,23,10,42,5,33,9 (ii) Perform the delete operations as sequence to delete the following numbers on the constructed binary and binary search trees. After each deletion, show the binary and binary search trees with current elements 5,1,89,40 (iii) Analyze the best, average and worst case time complexities of the insertion, deletion and searching an element in binary trees and binary search trees.

    Asked in Apr/May 2024

    (15)
  4. 4.
    (i) Explain the concept of divide and conquer and illustrate how the sorting algorithms merge and quick are coming under divide and conquer strategy. (ii) Write merge sort and quick sort algorithms and demonstrate the execution of these algorithms on the following elements. Show the position of the elements in each phase of the execution of the algorithms. 56,7,2,454,5,21,56,7,45,90,9,7 (iii) Write the recurrence relation of recursive merge sort algorithm and solve it to find time complexity. …

    Asked in Apr/May 2024

    (15)
  5. 5.
    Discuss in detail about topological ordering with examples.

    Asked in Nov/Dec 2022

    (15)
  6. 6.
    Give the importance of shortest paths in programming and explain the role of minimum spanning tree.

    Asked in Nov/Dec 2022

    (15)

A question asked once is no guarantee for the next exam; cover the full AD3251 syllabus. Read the papers themselves:Apr/May 2024, Nov/Dec 2023, Apr/May 2023, Nov/Dec 2022, Apr/May 2022.