【leetcode】4-Median of Two Sorted Arrays
problem:
什么是median(中值)?
solution中使用的是递归方法,可以自己推导一下下。。。
还没有完全明白,先记录下来。
Seeing someone can't understand why i+j=m−i+n−j (or: m−i+n−j+1) it's because the lengths of the arrays can be odd or even, when both are odd or even there is i+j = m−i+n−j when one array's length is odd and another is even then i+j = m−i+n−j+1
参考
1.leetcode-4-MedianofTwoSortedArrays;
完
各美其美,美美与共,不和他人作比较,不对他人有期待,不批判他人,不钻牛角尖。
心正意诚,做自己该做的事情,做自己喜欢做的事情,安静做一枚有思想的技术媛。
版权声明,转载请注明出处:https://www.cnblogs.com/happyamyhope/
心正意诚,做自己该做的事情,做自己喜欢做的事情,安静做一枚有思想的技术媛。
版权声明,转载请注明出处:https://www.cnblogs.com/happyamyhope/