庄生晓梦

庄生晓梦迷蝴蝶

博客园 首页 新随笔 联系 订阅 管理
  164 随笔 :: 3 文章 :: 1 评论 :: 73923 阅读

05 2012 档案

摘要:// var_cycle_001.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include using namespace std; class Obj { char name[ 10 ]; public : Obj( const cha... 阅读全文
posted @ 2012-05-31 13:55 qwop 阅读(189) 评论(0) 推荐(0) 编辑

摘要:#include void insertSort( int arr[] , int size ) { int i , j , k , f /*First element*/; // 0 1 2 3 4 // 4 3,2,1 // 3 4 2,1 // 2 3 4 1 // 1. 遍历无序区域 for ( i = 1; i j ; k--... 阅读全文
posted @ 2012-05-22 13:49 qwop 阅读(162) 评论(0) 推荐(0) 编辑

摘要:#include int halfSearch( int arr[], int num, int size ) { int min = 0, max = ( size - 1), mid; if ( size == 0 ) { return -1; } while ( 1 ) { // 1. when the boundary is "min" or "m... 阅读全文
posted @ 2012-05-21 09:20 qwop 阅读(169) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示