+ 1

Can somebody help me with this c code about binary search

It should only print “Not found” one time, but it turned out kept printing it.

19th Feb 2018, 5:52 PM
Charlie Lee
Charlie Lee - avatar
4 Answers
+ 1
I got it... Such a stupid mistake, heres the correct one https://code.sololearn.com/cHGXMuiuvq4g/?ref=app
19th Feb 2018, 6:10 PM
Charlie Lee
Charlie Lee - avatar
+ 1
while loop is already an recursion, doesn't need other recursions..
19th Feb 2018, 6:11 PM
Charlie Lee
Charlie Lee - avatar
19th Feb 2018, 5:53 PM
Charlie Lee
Charlie Lee - avatar
0
return is not ending the loop or maybe ur function is being called over and over
19th Feb 2018, 5:58 PM
Dominique Abou Samah
Dominique Abou Samah - avatar