Question: Given a randomly ordered array of n positive integer numbers, where n is odd. Consider the problem of splitting the array into two sorted arrays,

 Given a randomly ordered array of n positive integer numbers, where

Given a randomly ordered array of n positive integer numbers, where n is odd. Consider the problem of splitting the array into two sorted arrays, one containing numbers less than or equal to the median M, and the second containing numbers greater than M (M is not given). Implement a function to solve the above problem by using a minimum heap. (20 marks) (5 marks) Find the complexity of the algorithm in terms of n. . Note: The public member functions available in a PQ class are given on back of page

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!