You are on page 1of 1

Alexandria University

Faculty of Engineering File Structures Course


Computer and Systems Engineering Assigned: Thursday, March 14, 2024
Department Due: Monday, March 18, 2024

Sheet 3
Binary Heap - DFS - BFS

1 Solve These Problems


1. Insert the following keys in a max binary heap one by one showing the heap tree after
each insertion step: 5, 7, 12, 10, 8, 14, 9, 4.

2. Delete the max keys from the heap formed in the last question one by one until the heap
becomes empty.

3. Convert the following array to a min binary heap using O(n) algorithm showing all your
steps: [9, 12, 7, 2, 5, 1, 6].

2 LeetCode Problems Links


1. Last Stone Weight

2. Number of Islands

3. Course Schedule

4. Symmetric Tree

5. Loud and Rich

3 Submission
• You need to submit your solutions as pdf to ms teams as usual.

• Submitting the solutions to the sites and getting Accepted will be graded as a bonus.

• If you did the bonus you can put screenshots of your accepted code in addition to screen-
shot for your result in the problem from the site as your solution in the submitted pdf in
ms teams.

Good Luck

You might also like