Median of 2 sorted lists


Submit solution

Points: 10
Time limit: 5.0s
Memory limit: 64M

Authors:
Problem type
Allowed languages
Python

Problem Definition

You are given two sorted lists of numbers l1 and l2. Without merging/concatenating the two lists find the median of the two lists in O(log n) time.

Input Format:

first line contains the size of list 1

second line contains the size of list 2

third line list 1 elements sorted and space separated

fourth line list 2 elements sorted and space separated

Sample Input:

5

4

2 5 8 10 13

6 9 15 20

Sample Output:

9


Comments

There are no comments at the moment.