上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: public class Quick{ public static void main(String []args) { int arr[]={24,3,1,3,2,23,24,12,144,23,11,12,13,14,32,21,13}; Quick q=new Quick(); q.quick(arr,0,arr.length-1); for (int i=0;ia[i]) { i++; } if (i<j) { a[j--]=a[i]; } } a[i]=x; System.out.println("下标为:"+i); if (r<i) ... 阅读全文
posted @ 2013-09-24 17:54 hello,MR.Guo 阅读(142) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/morewindows/archive/2011/08/13/2137415.html快速排序由于排序效率在同为O(N*logN)的几种排序方法中效率较高,因此经常被采用,再加上快速排序思想----分治法也确实实用,因此很多软件公司的笔试面试,包括像腾讯,微软等知名IT公司都喜欢考这个,还有大大小的程序方面的考试如软考,考研中也常常出现快速排序的身影。总的说来,要直接默写出快速排序还是有一定难度的,因为本人就自己的理解对快速排序作了下白话解释,希望对大家理解有帮助,达到快速排序,快速搞定。快速排序是C.R.A.Hoare于1962年提出的一种划分交 阅读全文
posted @ 2013-09-24 11:06 hello,MR.Guo 阅读(324) 评论(0) 推荐(0) 编辑
摘要: http://student.zjzk.cn/course_ware/data_structure/web/paixu/paixu8.3.2.4.htm 阅读全文
posted @ 2013-09-23 17:21 hello,MR.Guo 阅读(179) 评论(0) 推荐(1) 编辑
摘要: public class BinarySearch{ public static void main(String[] args) { int arr[]={2,3,4,5,7,8,9,10}; BinarySearch bs=new BinarySearch(); bs.search(arr,8,0,arr.length-1); bs.search(arr,6,0,arr.length-1); } public void search(int arr[],int value,int left,int right) { if (left>right) { System.ou... 阅读全文
posted @ 2013-09-21 13:19 hello,MR.Guo 阅读(177) 评论(0) 推荐(0) 编辑
摘要: http://java.chinaitlab.com/base/810244.htmlhttp://www.cnblogs.com/rollenholt/archive/2011/07/04/2097081.htmlhttp://www.w3school.com.cn/js/index_pro.asphttp://java.chinaitlab.com/base/810244.html序号 运算符 含义 1 + 加法 2 - 减法 3 * 乘法 4 / 除法 5 % 模运算(取余运算) 6 ++ 递增运算 7 -- 递减运算 Java的算术运算符分为一元运算符和二元运算符。一元... 阅读全文
posted @ 2013-09-21 13:09 hello,MR.Guo 阅读(295) 评论(0) 推荐(0) 编辑
摘要: http://blog.sina.com.cn/s/blog_7c5064110100psax.htmlJava中提供了两个类型的算术运算符,一是双目运算符,一是单目运算符。其中双目运算符包括:(加)+,(减)-,(乘)*,(除)/,(求余)%使用它们时应注意以下几点:1)这些运算符的运算对象可以是byte、short、int、long、float、double、char类型,其中char类型在运算时被自动转为int型。例:public class Test1{public static void main(String arg[]){int A = 10;char B = 'B 阅读全文
posted @ 2013-09-21 13:04 hello,MR.Guo 阅读(1613) 评论(0) 推荐(0) 编辑
摘要: public class MaoPao{ public static void main(String []args) { int arr[]={14,52,16,37,8}; boolean flag=false; for (int i=0;i<arr.length-1;i++) { for (int j=0;j<arr.length-i-1;j++) { if (arr[j]<arr[j+1]) { int temp; temp=arr[j]; arr[j]=arr[j+1]; arr[j+1]=temp; flag=t... 阅读全文
posted @ 2013-09-21 12:09 hello,MR.Guo 阅读(115) 评论(0) 推荐(0) 编辑
摘要: http://blog.163.com/lizzy161@126/blog/static/1167012420075894811668/Java基本概念一.字符类型主要重温了一下各种字符类型占据的字节数。short 短整型 16位 2字节int 整型 32位 4字节long 长整型 64位 8字节 浮点分单精度float和双精度doublefloat 单精度 32位 4字节double双精度 64位 8字节 char 这一点比较特殊,java使用的不是ascii字符,也不是扩展的8位字符集,而是unicode字符集,unicode字符占据16位,2字节,可以表示人类所有发现的字符,也因为如此j 阅读全文
posted @ 2013-09-20 12:28 hello,MR.Guo 阅读(373) 评论(0) 推荐(0) 编辑
摘要: http://www.kankanews.com/ICkengine/archives/43109.shtmlTomcat服务器软件是有apache组织开发的并且免费开放给所有人下载,可以直接从apache官网下载:www.apache.org下载的是安装版,也可以使用压缩版(只要解压缩就行了)1、安装:Tomcat运行时候要使用到我们的JDK,必须有JAVA支持,所以安装后若要运行tomcat必须先配置好环境变量:设置JAVA_HOME变量,变量值为jdk路径,设置好以后,在以后Tomcat运行的时候会自动找到JAVA_HOME所指定的JDK进行操作 1,装好JDK(依赖JD... 阅读全文
posted @ 2013-09-14 19:47 hello,MR.Guo 阅读(191) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/liuxiaogangqq/article/details/8074758 Javaweb初学,Web应用程序简介应用程序:指允许用户执行特定任务的软件程序,主要分为桌面应用程序和Web应用程序两种类型。桌面应用程序(DesktopApplication):一般是指采用客户机/服务器结构(Client/Server)的应用程序。C/S模式将应用与服务分离,系统具有稳定性和灵活性C/S模式配备的是点对点的结构模式,适用于局域网,有可靠的安全性由于客户端实现与服务器端的直接连接,没有中间环节,因此响应速度快在C/S模式中,作为客户机的计算机都要安装客户机. 阅读全文
posted @ 2013-09-14 19:36 hello,MR.Guo 阅读(671) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页