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 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
Get step-by-step solutions from verified subject matter experts
