Skip to content

MsDiala/data-structures-and-algorithms-python

Repository files navigation

data-structures-and-algorithms-python

Challenge Summary

Write a function called BinarySearch which takes in 2 parameters: a sorted array and the search key. Without utilizing any of the built-in methods available to your language, return the index of the array’s element that is equal to the search key, or -1 if the element does not exist.

Challenge Description

wRITE A FUNCTION WHICH TAKES TWO PARAMS SORTED IN ARRAY AND SEARCH KEY AND RETURN INDEX OF ARR ELEMENT WHICH = TO SEARCH KEY OR "-1" IF IT'S NOT EXIST INPUT => [2,4,6,8],6 OUTPUT => 2

SolutionGetting Started

#3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages