Dsa Lab Questions
Dsa Lab Questions
(Regulations 2021) Time : 3 Hours Answer any one question, Max. Marks 100
1. Write a Python code for class, Flower, that has three instance variables of type str, int, and float
that respectively represent the name of the flower, its number of petals, and its price. Your class
must include a constructor method that initializes each variable to an appropriate value, and your
class should include methods for setting the value of each type, and retrieving the value of each type
using ADTs.
2. a. Implement List ADT to store the elements 10, 20,30,40,50 and find any element and delete 30
from the list and display the elements after deletion using Python arrays.
b. Write a Python code to find the Fibonacci value of N using recursive function.
11. Write a Python code to implement the operations of List ADT using linked list and perform the
following
b. Write a Python code to find the Factorial value of given number N using recursive function.
13. a. Write a Python code for Tree representation and traverse by Preorder.
b. Write a Python code to find the Fibonacci value of N using recursive function.
14. a. Write a Python code for Tree representation and traverse by Postorder.
b. Write a Python code to find the Fibonacci value of N using recursive function.
15. a. Write a Python code for Tree representation and traverse by Inorder.
b. Write a Python code to find the Fibonacci value of N using recursive function.
16. a. Write a Python code to implement Binary Search Trees by satisfying its properties.
b. Write a Python code to find the Factorial value of given number N using recursive function.
18. a. Write a Python code for Graph representation and Traverse it by anyone algorithm.
19. a. Write a Python code to implement minimum spanning tree by anyone algorithm.
20. a. Write a Python code to implement single source shortest path algorithm.
b. Write a Python code to find the Factorial value of given number N using recursive function.