摘要: Map map = new HashMap(); String[] ipList=IpList.split("_"); boolean ipIn=false; for(int i=0;i ipe){ long t = ips; ips = ipe; ipe = t; } if((ips <= ipt && ipt <= ipe)){ ... 阅读全文
posted @ 2013-09-30 15:55 果汁果粒 阅读(651) 评论(0) 推荐(0) 编辑
摘要: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).1、如果把A和B合并成C,再取中位数。复杂度应该是O(m+n),不满足要求。2、要清楚的一个概念是:如果(m+n)为偶数,中位数应该是(m+n)个数排序后,位于中间的两个数的加和除以2.0。3、没有思路……用了这篇:http://www.cnblogs.com/lautsi 阅读全文
posted @ 2013-09-30 15:47 果汁果粒 阅读(195) 评论(0) 推荐(0) 编辑