Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
2 answers
110 views

Binary Search using recursive approach

Is the following implementation of recursive function correct? How about the time complexity of the code; is it good in terms of performance? ...
Siawash Kasra's user avatar
0 votes
2 answers
371 views

Binary search for integers

I've written binary search with only my own efforts 💪💪 without glancing at anywhere. I stuck on finding base case. At final, I think that if last checking is less than first index or first checking ...
Soner from The Ottoman Empire's user avatar
3 votes
1 answer
1k views

A recursive function that performs a binary search

I created a recursive function that uses binary search to just return true if it finds the value and false if it does not. I'm new to recursion and binary search so please let me know where I can ...
Joseph Palomino's user avatar
5 votes
1 answer
1k views

Find maximum element in bitonic array

An array is bitonic if it is composed of an increasing sequence of integers followed immediately by a decreasing sequence of integers. Write a program that, given a bitonic array of N distinct integer ...
CodeYogi's user avatar
  • 5,177
8 votes
3 answers
15k views

Recursive binary search in Python

I have implemented a recursive binary search in Python and tried to implement some verification to my code. Other than that, is there any optimization I am missing? ...
CodeYogi's user avatar
  • 5,177