Is it C Option?

1 vote

0

Only two option looking best A and C , so chooses C .

Okk but A is answer my reason regarding A is using built heap you can got O(n)

Okk but A is answer my reason regarding A is using built heap you can got O(n)

1

and @srestha

why are you assuming m<n ?

O(m+n) is best option, it will satisfy either if m<n or n<m , but O(n) is not correct if m>n

why are you assuming m<n ?

O(m+n) is best option, it will satisfy either if m<n or n<m , but O(n) is not correct if m>n