i. construct a cartesian tree for input sequence
ii. put the root element of above tree in a priority queue
iii. if( priority queue is not empty) then
iv. search and delete minimum value in priority queue
v. add that to output
vi. add cartesian tree children of above node to priority queue
a) constructs a cartesian tree
b) sorts the input sequence
c) does nothing
d) produces some random output
What happens if we apply the below operations on an input sequence?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What happens if we apply the below operations on an input sequence?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!