摘要:        
二分查找又称折半查找,它是一种效率较高的查找方法。 【二分查找要求】:1.必须采用顺序存储结构 2.必须按关键字大小有序排列。[java]view plaincopy/***二分查找又称折半查找,它是一种效率较高的查找方法。 【二分查找要求】:1.必须采用顺序存储结构2.必须按关键字大小有序排列。*@authorAdministrator**/publicclassBinarySearch{publicstaticvoidmain(String[]args){int[]src=newint[]{1,3,5,7,8,9};System.out.println(binarySearch(src..    阅读全文
posted @ 2013-05-10 17:31
幻星宇
阅读(169)
评论(0)
推荐(0)
        
            
        
        
摘要:        
package com;/** * 冒泡排序 */public class Taxis {	/** * @param args */	public static void main(String[] args) { int c = 0;	//定义int变量 int arr[] = {12,56,4,62,8};	//定义用于排序的数组 System.out.println("没有排序前数组中的元素为:"); for (int i = 0; i < arr.length; i++) { System.out.print(arr[i] + " ");     阅读全文
posted @ 2013-05-10 17:09
幻星宇
阅读(285)
评论(0)
推荐(0)
        
 
                     
                    
                 
                    
                
 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号