gzpk

随笔分类 -  基本算法

swap
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<iostream>usingnamespacestd;voidswap(int*i,int*j){inttemp=*i;*i=*j;*j=temp;}voidswap2(... 阅读全文

posted @ 2010-09-03 20:14 gzpk 阅读(204) 评论(0) 推荐(0)

有序表的折半查找
摘要:非递归实现代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<stdio.h>intsearch(intnum[],intn,intkey){intlow=0;inthigh=n-1;intmid=0;while(low&... 阅读全文

posted @ 2010-06-24 18:15 gzpk 阅读(335) 评论(0) 推荐(0)

导航