Binary Search

개발/프로그래밍2010. 7. 24. 23:30
728x90

while(low <= high){ mid = (low +high) /2; if(Docs[mid].DocID > srchinfo->idx.block[i]){ high = mid -1; }else if(Docs[mid].DocID < srchinfo->idx.block[i]) { low = mid +1; } else { CompareIDX[k].DocID = Docs[mid].DocID; CompareIDX[k].Similarity = Docs[mid].Similarity; k++; break; } }



728x90

작성자

Posted by 일퍼센트

관련 글

댓글 영역