29:数组中出现次数超过一半的数字 方法a. 排序取中 O(nlogn) 方法b.
partition 函数分割找中位数 >=O(n) 方法 c. 设计数变量,扫描一遍。 O(n)#include int findNumber(int
data[], unsigned length){/* if(c...
分类:
其他好文 时间:
2014-05-02 19:47:41
阅读次数:
535
//字符串全排列package com.demo.acm;public class
AllSortChar { public static void allSort(char[] buf,int start,int end){
if(start==end){ ...
分类:
其他好文 时间:
2014-05-02 19:43:21
阅读次数:
256
CentOS修改IP地址# ifconfig eth0
192.168.1.80这样就把IP地址修改为192.168.1.80(如果发现上不了网了,那么你可能需要把网关和DNS也改一下,后面会提到),但是当你重新启动系统或网卡之后,还是会变回原来的地址,这种修改方式只适用于需要临时做IP修改。要想永...
分类:
其他好文 时间:
2014-05-02 18:51:19
阅读次数:
411
对于网图来说,最短路径,是指两顶点之间经过的边上权值之和最少的路径,并且我们称路径上的第一个顶点为源点,最后一个顶点为终点。最短路径的算法主要有迪杰斯特拉(Dijkstra)算法和弗洛伊德(Floyd)算法。本文先来讲第一种,从某个源点到其余各顶点的最短路径问题。这是一个按路径长度递增的次序产生最短...
分类:
其他好文 时间:
2014-05-02 18:31:51
阅读次数:
426
安装java,首先要下载jdk下载路径:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html我下载的是jdk-7u55-linux-i586.rpm对我来说,下载哪种jdk都一样,都是安...
分类:
编程语言 时间:
2014-05-02 18:29:40
阅读次数:
390
Windows Phone是微软公司在2010年发布的智能手机操作系统,目前最新版本是Windows
Phone 8.0,在市面上能见到的是Windows Phone
7.5(Mango和Tango),下面,从开发者角度,分几个方面对比他们的不同。一、硬件iOS与Windows Phone系统都为闭...
分类:
移动开发 时间:
2014-05-02 18:18:49
阅读次数:
488
16、Power digit sum215= 32768 and the sum of its
digits is 3 + 2 + 7 + 6 + 8 = 26.What is the sum of the digits of the number
21000?题目大意:215= 32768 并且其...
分类:
其他好文 时间:
2014-05-02 13:17:49
阅读次数:
1223
裸差分约束。//#pragma comment(linker,
"/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#includ...
分类:
其他好文 时间:
2014-05-02 13:13:29
阅读次数:
290
上一篇中,使用客户端jJSAjaxFileUploader插件实现单文件异步上传,本篇实现多文件异步上传。本篇源码在github,先看效果:●
上传文件显示进度条。 ● 停止上传按钮和关闭缩略图按钮。 ● 限制上传文件的类型。 ● 限制上传文件的尺寸。 ●同时上传多个文...
分类:
Web程序 时间:
2014-05-02 13:11:17
阅读次数:
611