mergeTree(p,q)
if p.root.value <= q.root.value
return p.addTree(q)
else
return q.addTree(p)
a) True
b) False
Given the pseudo code, state whether the function for merging of two heap is correct or not?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Given the pseudo code, state whether the function for merging of two heap is correct or not?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!