Binary Search in Python



In computer science, binary search, also known as half-interval search or logarithmic search, is a search algorithm that finds the position of a target value within a sorted array. Binary search compares the target value to the middle element of the array; if they are unequal, the half in which the target cannot lie is eliminated and the search continues on the remaining half until it is successful or the remaining half is empty.

-~-~~-~~~-~~-~-
Please watch: “An Introduction to Reinforcement Learning”

-~-~~-~~~-~~-~-

source

Reply

Do NOT follow this link or you will be banned from the site!