ParsX.com
پذیرش پروژه از دانشجویی ... تا سازمانی 09376225339
 
   ProfileProfile   Log in to check your private messagesLog in to check your private messages  |  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups Log inLog in   RegisterRegister 

تو رو خدا کمک(جستجوی دودوئی)

 
Post new topic   Reply to topic    ParsX.com Forum Index -> C/C++ Programming
View previous topic :: View next topic  
Author Message
nei
مهمون يكي دو روزه


Joined: 09 Dec 2006
Posts: 31

PostPosted: Sun Feb 04, 2007 12:31 pm    Post subject: تو رو خدا کمک(جستجوی دودوئی) Reply with quote

Exclamation

Last edited by nei on Sun Jul 15, 2007 10:43 am; edited 1 time in total
Back to top
vahid
بي تو هرگز


Joined: 26 Nov 2004
Posts: 3067
Location: Tehran

PostPosted: Tue Feb 06, 2007 1:01 pm    Post subject: Reply with quote

آقا من همين رو جواب مي دم .
بقيش رو وقت نمي كنم .
Back to top
vahid
بي تو هرگز


Joined: 26 Nov 2004
Posts: 3067
Location: Tehran

PostPosted: Tue Feb 06, 2007 2:32 pm    Post subject: Reply with quote

تابع بازگشتي جستجوي دودويي

int BinSearchRec(int a[],int k,int m,int n)
{
int p;
if(m<=n){
p=(m+n)/2;
switch(compare(a[p],k){
case -1: return BinSearchRec(a,k,p+1,n);
case 0:return p;
case 1:return BinSerarchRec(a,k,m,p-1);
}
}
return -1;}
Back to top
nei
مهمون يكي دو روزه


Joined: 09 Dec 2006
Posts: 31

PostPosted: Wed Feb 07, 2007 5:47 pm    Post subject: Reply with quote

دمت گرم
Back to top
Display posts from previous:   
Post new topic   Reply to topic    ParsX.com Forum Index -> C/C++ Programming All times are GMT + 3.5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum