摘要:
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 阅读全文
摘要:
{线性的顺序查找}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 阅读全文