Fall 2024_CS502_2
Fall 2024_CS502_2
Fall 2024_CS502_2
02
Fall 2024 Total Marks: 15
CS502- Fundamentals of Algorithms
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (zero marks) if:
The assignment is submitted after due date.
The submitted assignment is other than MS Word file.
The submitted assignment does NOT open or file is corrupted.
The assignment is copied (from other student or ditto copy from handouts or internet).
Uploading instructions
For clarity and simplicity, you are required to upload/submit only one .doc/docx file.
Lectures:
Objectives
Question No. 1:
Following is the tree diagram of max heap. You have to perform the insert operation on the given tree. You are
required to insert node 35 in the given heap tree, apply heapify procedure and then show only the final max
heap tree. No need to show the intermediate steps.
Question 2:
Given below is an unsorted array. You are required to sort the following given array step by step, using Merge
Sort (ascending order). You are required to correctly fill the empty cells given below using the divide and conquer
strategy of merge sort algorithm.
38 27 43 3
? ?
? ?
? ? ?
?
? ? ? ?
? ? ? ?
Good Luck!
Total Marks: 15