Click here to Skip to main content
15,895,370 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Given two arrays one with m elements and one with n elements. Find median of the two arrays if combined. m and n is different sizes. Give the most optimized solution with O(1) space complexity and minimum time complexity.

What I have tried:

Given two arrays one with m elements and one with n elements. Find median of the two arrays if combined. m and n is different sizes. Give the most optimized solution with O(1) space complexity and minimum time complexity.

Actually nothing. I need some concrete direction.
Posted
Updated 26-Oct-17 9:56am
Comments
Richard MacCutchan 26-Oct-17 17:34pm    
This is not a programming problem, it's mathematics.

1 solution

Quote:
I need some concrete direction.

Start by doing search on internet.
Quote:
Find median of the two arrays

go Google.
Take a sheet of paper and pencil, then try to do samples by hand.
Once you know how to do, it is basically your algorithm.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900