Code No.
: 22CSC35
CHAITANYA BHARATHI INSTITUTE OF TECHNOLOGY (Autonomous)
B.E. & B.Tech III Sem (Main) Examination Dec 2023 – Jan 2024
Data Structures using Python
(Common to Mech, Chem & Biotech)
Time: 3 Hours Max Marks: 60
Note: Answer ALL questions from Part-A at one place in the same order and Part–B
(Internal Choice)
Part - A
(5Q X 2M = 10 Marks)
M CO BT
1 What is Data Visualization? (2) 2 1
2 Define sorting and write the time complexities of selection sort, merge sort, (2) 3 2
quick sort and radix sort.
3 Differentiate between singly linked list and doubly linked list (2) 4 3
4 List out applications of graph. (2) 4 3
5 Define Hash table? (2) 4 1
Part - B (50 Marks)
(5Q X 10M = 50 Marks)
M CO BT
6 (a) Explain Class and Object in python with an example. (5) 1 1
(b) What is NumPy? Create 2D array and 3D arrays using NumPy. (5) 2 3
(OR)
7 (a) Write briefly about pandas series and Write program to create pandas (5) 2 3
series for the given NumPy array A=[20,47,12, 63, 58, 75]
(b) Explain selection and slicing in pandas with examples. (5) 2 2
8 (a) What is Data structure? Discuss briefly about classification of data (5) 1 1
structures.
(b) Explain Asymptotic Notations with neat sketch. (5) 1 2
(OR)
9 (a) Using radix sort technique, sort the following list. (5) 3 3
4245,114,2745,12, 6578,34,9876,143,341,7777
(b) Write python program to Implement Quick sort. (5) 3 1
10 (a) Write an algorithm/pseudocode to count the number of nodes in a singly (5) 4 2
linked list.
(b) Illustrate the procedure to insert a node at the beginning of doubly linked (5) 4 2
list.
(OR)
11 (a) Illustrate Push and Pop operations of stack using linked list. (5) 4 2
(b) Which data structure you would choose out of STACK and QUEUE for (5) 4 4
railway ticket reservation? Justify your choice.
Page 1 of 2
Code No.: 22CSC35
12 (a) Illustrate the procedure to delete node with two children (left child and (5) 4 3
right child) from binary search tree with an example.
(b) Discuss the Properties of Binary Trees. (5) 4 1
(OR)
13 (a) Illustrate the representation of graph using Adjacency matrix. (5) 4 2
(b) Give algorithm for DFS and demonstrate DFS using suitable example. (5) 4 3
14 (a) Describe the brute force algorithm for pattern matching. (5) 5 1
(b) Solve the Rabin-Karp algorithm for the following Example: (5) 5 3
Text: HEREISANEXAMPLE Pattern: EXAMPLE
(OR)
15 (a) Resolve collisions by using linear probing technique for hash table of (5) 4 3
size 11 for the following input 22, 15, 78, 77, 51, 32, 65, 11.
(b) Discuss briefly about separate chaining technique. (5) 4 1
*****
Page 2 of 2