I'm Gilmar Soares · Nov 21, 2024
Explaining Binary Search in a Simple Way
0Sign in to vote or save
This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
Today I try to explain binary search in a simple way. Binary search is a search algorithm that finds the position of a target value within a sorted array. Sorted array is an important point here. To explain binary search, we need a array to exemplify. arr := [] int { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 } In this array, we have 10 elements, from 1 to 10. Binary search works by comparing the…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.