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

3CAI4-05-_Data_Structures_and_Algorithms-_Assignment-III

This document outlines Assignment-III for B.Tech Computer Science (AI) students, focusing on data structures and algorithms. It includes a series of questions related to AVL trees, binary search trees, graph concepts, sorting algorithms, and expression conversions. The assignment requires students to demonstrate their understanding through practical examples and theoretical explanations.

Uploaded by

hitesh8302862553
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)
3 views

3CAI4-05-_Data_Structures_and_Algorithms-_Assignment-III

This document outlines Assignment-III for B.Tech Computer Science (AI) students, focusing on data structures and algorithms. It includes a series of questions related to AVL trees, binary search trees, graph concepts, sorting algorithms, and expression conversions. The assignment requires students to demonstrate their understanding through practical examples and theoretical explanations.

Uploaded by

hitesh8302862553
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/ 4

3CAI4-05: Data Structures and Algorithms

Assignment-III
B.TECH COMPUTER SCIENCE (AI)-III Semester-BATCH 2023-27
Questions Registration No. Registration No. Registration
No.

Q1. Define an AVL tree. Obtain an AVL tree by


inserting one integer at a time in the following sequence.
150, 155, 160, 115, 110, 140, 120, 145, 130, 147, 170,
180.
Show all the steps. PCE23CA001 PCE23CA030
Q2. Create a Binary Search Tree for the following
data and do in-order, Preorder and Post-order traversal
of the tree.
50, 60, 25, 40, 30, 70, 35, 10, 55, 65, 5 PCE23CA002 PCE23CA031
Q3. Discuss following with reference to graphs.
(i) Directed graph (ii) Undirected graph (iii) Degree of
vertex
(iv)Null graph (v) Acyclic Graph PCE23CA003 PCE23CA032
Q4. Explain heap sort. Construct heap and sort for
the initial key set 42, 23, 74,11, 65,58,94,36,99,87.
PCE23CA004 PCE23CA033
Q5. .Convert the following infix expression into
postfix form (A+B)*(C+D)*E^F PCE23CA005 PCE23CA034
Q6. Convert the infix expression (A-B/C)*(D/E-F) into
a postfix.
Postfix: ABC/-DE/F-* PCE23CA006 PCE23CA035
Q7. Construction of the AVL Tree for the given
Sequence 21, 26, 30, 9, 4, 14, 28, 18,15,10, 2, 3, 7 PCE23CA007 PCE23CA036
Q8. Sort the array using Counting Sort:
Input: [4,2,2,8,3,3,1] PCE23CA008 PCE23CA037
Q9. Sort the array using Merge Sort:
Input: [10,20,10,30,40,20,10] PCE23CA009 PCE23CA038
Q10. Sort the array using Quick Sort:
Input: [10,20,15,17,19,12,36, 14, 81, 18] PCE23CA010 PCE23CA039
Q11. Sort Array using Selection Sort:
Input: [10,20,15,17,19,12,36, 14, 81, 18] PCE23EE002 PCE23CA040
Q12. Sort the array using Bubble Sort:
Input: [10,20,15,17,19,12,36, 14, 81, 18]
PCE23CA011 PCE23CA041
Q13. Draw BST for:
25,17,61, 31, 27, 36, 91, 71, 5, 14, 18, 8, 23
delete node 14, 27 PCE23CA012 PCE23CA042
Q14. Draw Heap for:
25,17,61, 31, 27, 36, 91, 71, 5, 14, 18, 8, 23
delete node 14, 27 PCE24CA801 PCE23CA043
3CAI4-05: Data Structures and Algorithms
Assignment-III
B.TECH COMPUTER SCIENCE (AI)-III Semester-BATCH 2023-27
Q15. Draw Heap for:
Input: [10,20,15,17,19,12,36, 14, 81, 18]
Delete 12 PCE23CA013 PCE23CA044
Q16. Convert infix to postfix A+(B*C-(D/E-F)*G)*H PCE23CA014 PCE23CA045
Q17. Convert the following infix expression to postfix
expression using a stack:
(A+B)×(C−D)/E PCE23CA015 PCE23CA046
Q18. Convert the following infix expression to postfix
expression using a stack:
A×(B+C−D)/(E×F) PCE23CA016 PCE23CA047
Q19. A company analyzes log files with hundreds of
thousands of entries daily. Each entry has a timestamp,
and logs must be sorted chronologically. Why might
quick sort be appropriate or inappropriate for this?
Would it make a difference if the log entries were nearly
sorted already? PCE23CA017 PCE23CA048
Q20. Imagine you're creating a digital representation
of a company’s organizational hierarchy. Each employee
has a manager, and managers can have multiple
subordinates. Describe how a binary tree could
represent this structure and explain what traversal
method (preorder, inorder, postorder) would be most PCE23CA018
useful to list employees from highest to lowest rank. PCE23CA049
Q21. An operating system needs to prioritize tasks
based on urgency. Explain how a binary max-heap could
be used to implement this, ensuring that the highest-
priority task is always executed first. PCE23CA019 PCE23CA050
Q22. Suppose you’re looking for a person’s phone
number in a phone directory that is sorted
alphabetically. Which searching algorithm would be the
ideal choice. Describe the steps you’d take to find the
person’s phone number using that searching algorithm. PCE23CA020 PCE23CA051
Q23. A manager needs to rank 15 employees based
on performance scores to determine who will receive
awards. Explain which sorting algorithm will be best
suitable in this case. PCE23CA021 PCE23CA052
Q24. Sort the array using Merge Sort:
Input: [10,20,10,30,40,20,10] PCE23CA022 PCE23CA053
Q25. Sort the array using Quick Sort:
Input: [10,20,15,17,19,12,36, 14, 81, 18] PCE23CA023 PCE23CA054
Q26. Sort Array using Selection Sort:
Input: [10,20,15,17,19,12,36, 14, 81, 18] PCE23CA024 PCE23CA055
3CAI4-05: Data Structures and Algorithms
Assignment-III
B.TECH COMPUTER SCIENCE (AI)-III Semester-BATCH 2023-27
Q28. Draw BST for:
25,17,61, 31, 27, 36, 91, 71, 5, 14, 18, 8, 23
delete node 27, 14 PCE23CA025 PCE23CA057
Q29. Draw Heap for:
25,17,61, 31, 27, 36, 91, 71, 5, 14, 18, 8, 23
delete node 25, 8 PCE23CA026 PCE23CA058
Q30. Draw Heap for:
Input: [10,20,15,17,19,12,36, 14, 81, 18]
Delete 12 PCE23CA027 PCE23CA059
Q31. Convert infix to postfix A+(B*C-(D/E-F)*G)*H
Q32. Convert the following infix expression to postfix
expression using a stack:
(A+B)×(C−D)/E PCE23CA028 PCE23CA060
Q33. Convert the following infix expression to postfix
expression using a stack:
A×(B+C−D)/(E×F)
Input: [4,2,2,8,3,3,1] PCE23CA029 PCE23CA061
Q34. Find BFS. PCE23CA062 PCE23CA063

Q35. Find MST using PRIM’s method: Compulsory for all

Q36. Find Shortest path using Dijkstra’s Compulsory for all


algorithm.
3CAI4-05: Data Structures and Algorithms
Assignment-III
B.TECH COMPUTER SCIENCE (AI)-III Semester-BATCH 2023-27

You might also like