0% found this document useful (0 votes)
19 views

Data Structure and Algorithm using Python 7-24

ab

Uploaded by

Farhan Kazi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Data Structure and Algorithm using Python 7-24

ab

Uploaded by

Farhan Kazi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DR.

BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE


Supplementary Examination – Summer 2024
Course: B. Tech. Semester: III
Branch: Artificial Intelligence and Data Science Engineering and Allied
Subject Code & Name: BTAIC303 Data Structure and Algorithm using Python

Max Marks: 60 Date: 04/07/2024 Duration: 3 Hr.


Instructions to the Students:
1. All the questions are compulsory.
2. The level of question/expected answer as per OBE or the Course Outcome (CO) on which
the question is based is mentioned in ( ) in front of the question.
3. Use of non-programmable scientific calculators is allowed.
4. Assume suitable data wherever necessary and mention it clearly.
Marks
Q. 1 Solve the following.
A) Explain the following string inbuilt functions with syntax and example: 4
i) len( ) ii) max ( ) iii) min ( ) iv) isdigit( )
B) Write a function that accepts two positive integers a and b and return a list of odd 4
numbers between a and b
C) Write a python code to find the maximum of two numbers using function with 4
arguments.

Q.2 Solve any Two of the following.


A) Explain the Importance of OOP. Explain the following concepts: 6
i)Class ii) Abstraction iii) Encapsulation
B) Write pythom program to create a class Box, and calculate volume of a box, use 6
__init__ method
C) What is exception handling? Write python code Program to handle multiple errors 6
with one except statement

Q. 3 Solve Any Two of the following.


A) What is linked list? Perform the polynomial addition using linked List 6
P(x)= 12x4 + 2x2 + 10 Q(x)= 9x3 + 8x2 + x
B) Write algorithm to evaluate postfix expression. evaluate the following postfix 6
expression using Stack: 6 4 + 9 3 - *
C) Define Queue. Implement queue using Python List. 6

Q.4 Solve Any Two of the following.


A) Given input { 4371,1323,6173,4199,4344,9679,1989} and a hash function h(X) = X 6
(mod 10).Show the resulting
1.Separate chaining table
2.Open addressing hash table using linear probing
3.Open addressing hash table using Quadratic probing

B) Write algorithm for binary tree traversal techniques- Inorder, preorder and postorder 6
C) Suppose that we have the following key values 7,16,49,82,5,31,6,2,44. 6
Sort the keys using max heap.

Q. 5 Solve Any Two of the following.


A) Write python code to implement selection sort. 6
B) Differentiate between Linear search and Binary Search method. Search key x= 35 , x=28 6
using binary search and linear search method from following list: 10, 15, 25, 28, 35,
42, 55. Comment on number of comparisons required.

C) Explain i) Greedy method ii) Big-O Notation 6


*** End ***

You might also like