Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Insert and shift middle index of array

Given a sorted array and a search key, find the key and return it's index or return -1 if the key is not found.

Challenge

Algorithm input consists of a sorted array or similar language data structure, and a key value. Output should be an index where the key can be found or -1. No standard library solutions for array manipulation are to be used. Search algorithm used is binary search with a time complexity of O(log n)

The stretch goal is to test algorithm use on larger datasets.

Solution

Whiteboard Images