This solution fails in case [2, 1, 2, 1, 5]
Ilovecode123
@Ilovecode123
Posts made by Ilovecode123

RE: Clean Java Slow/Fast Solution

RE: Simple Divide and Conquer AC solution without Segment Tree
We would like to see a proof of correctness for "maxCombineArea." I have one proof, but I'm curious what yours is.

RE: My python solution (104ms)
Can you explain what is going on? I don't understand.

RE: My 24ms C solution! Perfectly O(log(m+n))
This is not a correct solution. The second while loop can run in O(m+n) time. How? If the size of nums1 is much greater than the size of nums2, half of the median can still be much much greater than the size of nums2. The first loop will break on the first iteration. And the second loop will run through the entirety of nums1 or nums2.

RE: My accepted Python solution in 112ms
This is an N*log(N) solution, O(N) at best. I think there is an error with the tests. It should not pass.

RE: Time Limited Exceeded
You have an O(n^2) solution. Are you sure at the start of each loop you need to iterate from the start index?