i m referring to daizi's algo.....

n = size of num
i = 0
j = n-1
while(i < j) {
   c = num[i] + num[j]
   if(c < given number) i++
   else if(c > given number) j-- 
   else show<i,j> and  j-- 


}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to