国内一个女的给我lg写了这么一封信,我看了有点生气,不知道是(转载)# Joke - 肚皮舞运动
d*i
1 楼
某大牛的solution是参考MIT做出来的,但是我不理解findMedian(B, A, Math.max(0,
mid-m), Math.min(n-1, mid))中的Math.max(0, mid-m)和Math.min(n-1, mid)是做什
么用的?
代码在这里:http://n00tc0d3r.blogspot.com/2013/04/median-of-two-sorted-arrays.html
MIT的note在这里:http://www2.myoops.org/course_material/mit/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-046JFall-2005/30C68118-E436-4FE3-8C79-6BAFBB07D935/0/ps9sol.pdf
mid-m), Math.min(n-1, mid))中的Math.max(0, mid-m)和Math.min(n-1, mid)是做什
么用的?
代码在这里:http://n00tc0d3r.blogspot.com/2013/04/median-of-two-sorted-arrays.html
MIT的note在这里:http://www2.myoops.org/course_material/mit/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-046JFall-2005/30C68118-E436-4FE3-8C79-6BAFBB07D935/0/ps9sol.pdf