摘要: uses SysUtils,Classes;type CardType=array[0..3] of string; const CardNums=12;type RCardrecord=record CardInfo: string; end; PCard=^RCardrecord;var slist: TList; i,j: Integer; iSub,iSpare: Integer; sCardType,sCardNum: string; aCard: PCard; iRandom,iCount: Integer; tCardInfo: string; aCardType: CardTy 阅读全文
posted @ 2013-08-14 17:31 露水上的青蛙 阅读(238) 评论(0) 推荐(0) 编辑
摘要: {线性的顺序查找}function seqSearch(sArr: array of Integer;aCount: Integer;const index: Integer):Integer;var i: Integer;begin Result := -1; for i := 0 to aCount do if sArr[i]=index then begin Result := i; Break; end;end;{对数性的二分查找}function binarySearch(sArr: array of Integer;aCount: Integer;const index: Inte 阅读全文
posted @ 2013-08-14 15:43 露水上的青蛙 阅读(364) 评论(0) 推荐(0) 编辑