0

Can someone implement Binary Search in Python?

I have a test about it tomorrow and tried it for hours today, but wasn't successful...

4th Nov 2021, 10:09 PM
Sndr Brst🇩🇪
Sndr Brst🇩🇪 - avatar
8 Answers
4th Nov 2021, 10:28 PM
Simon Sauter
Simon Sauter - avatar
+ 2
You can take a look at the code section there are a lot of examples.
4th Nov 2021, 10:34 PM
Simon Sauter
Simon Sauter - avatar
+ 2
Simon Sauter aaah thank you, I've been there already and forgot that this could be a good option to search there. Thanks!
4th Nov 2021, 10:41 PM
Sndr Brst🇩🇪
Sndr Brst🇩🇪 - avatar
+ 2
I've added a simple implementation of my own. https://code.sololearn.com/cV4bhNxboSee/?ref=app
4th Nov 2021, 11:55 PM
Simon Sauter
Simon Sauter - avatar
+ 1
Here on sololearn where people post their codes. In the app it's in the middle at the bottom. Use the search option and filter for python codes.
4th Nov 2021, 10:38 PM
Simon Sauter
Simon Sauter - avatar
0
The thing is we havent learnt recursion yet and we should solve it without using functions too...
4th Nov 2021, 10:33 PM
Sndr Brst🇩🇪
Sndr Brst🇩🇪 - avatar
4th Nov 2021, 10:33 PM
Sndr Brst🇩🇪
Sndr Brst🇩🇪 - avatar
0
which code section do you mean?
4th Nov 2021, 10:36 PM
Sndr Brst🇩🇪
Sndr Brst🇩🇪 - avatar