0% found this document useful (0 votes)
55 views2 pages

M1 T1 Question Paper

The document outlines a series of questions related to Data Structures and Algorithms, covering topics such as data structures vs primitive data types, storage representations, sorting techniques, searching algorithms, and linked lists. It includes specific questions on operations like binary search, stack operations, and the conversion of infix expressions. Additionally, it discusses the applications of stacks and provides algorithms for sorting and searching techniques.

Uploaded by

archana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views2 pages

M1 T1 Question Paper

The document outlines a series of questions related to Data Structures and Algorithms, covering topics such as data structures vs primitive data types, storage representations, sorting techniques, searching algorithms, and linked lists. It includes specific questions on operations like binary search, stack operations, and the conversion of infix expressions. Additionally, it discusses the applications of stacks and provides algorithms for sorting and searching techniques.

Uploaded by

archana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Department of Computer Science and Engineering

Vignan’ foundation for Science, Technology and Research


(Deemed to be University)
Vadlamudi, Guntur-522213, Andhra Pradesh
24DA114– Data Structures and Algorithms
Module 1- T1

Part-A
Question 1
a) Define Data Structure and contrast it with primitive data types. Provide an example where
a data structure is a better solution than using primitive data types. [3M]
b) Explain the concept of sequential and linked storage representations with examples. How
do these storage structures differ in terms of memory allocation and access time? [4M]
c) Suppose you have to design a system to store student records. Identify whether a sequential
or linked storage representation would be more appropriate and justify your choice. [3M]

Question 2
a) Explain different kinds of sorting techniques. [2M]
b) Define Selection Sort and Insertion Sort. Compare their time complexities and stability.
[3M]
c) Explain how Quick Sort works and why it is considered more efficient than Bubble
Sort for large datasets. Provide an example of partitioning in Quick Sort. [5M]

Question 3
a) What does Binary Search stand for, and why is it used in sorted datasets? [3M]
b) Explain the difference between Linear Search and Binary Search in the context of
searching for an element in an array. [3M]
c) Perform a binary search on the sorted dataset {3, 6, 7, 9, 13} with search key=13. Explain
the step-by-step procedure and determine the number of comparisons made during the search
process. [4M]

Question 4
a) Define Linked List and contrast it with Arrays. Provide an example where a Linked List is
a better solution than an Array. [2M]
b) Explain the concept of Singly Linked List, Doubly Linked List, and Circular Linked
List with examples. How do these types of linked lists differ in terms of memory usage and
operations like insertion and deletion? [6M]
c) Suppose you have to design a system to manage a playlist of songs. Identify whether a
Singly Linked List, Doubly Linked List, or Circular Linked List would be more appropriate
and justify your choice. [2M]

Question 5
a) Explain the concept of a stack. What are the basic operations supported by a stack? [2M]
b) What is the difference between a stack and a queue in terms of data access? [3M]
c) A circular queue is implemented using an array of size 5. The front is at index 2, and the
rear is at index 4. A new element is inserted. Show the updated front and rear positions.
[3M]
d) What will be the output of the following sequence of stack operations on the given stack?
[2M]
i) Push 7,8 on to the stack,
ii) pop one element on the resultant stack from question (i)
Part-B
1. (a) What are the different applications of a stack? Explain the terms infix expression,
prefix expression, and postfix expression. [3M]
(b) Write an algorithm for converting the infix expression to a postfix expression.
[5M]
(c) Convert the infix expression ((A – B) + D / ((E + F) * G)) to corresponding prefix
and postfix expressions. [2M]

2. (a) What is a linked list? Explain in brief about different types of linked lists. [4M]
(b) What is the linked representation of the following polynomial: [3M]
3 2 2
7 x y – 8 x y+ 3 xy +11 x – 4
(c) Compare and contrast between circular linked lists and doubly linked lists. [3M]

3. (a) Explain different types of searching techniques. Write an algorithm to implement


Linear Search. [5M]
(b) List out various sorting techniques available. Write an algorithm to implement the
Selection sort. [5M]

You might also like