Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Find First and Last Position of Element in Sorted Array (Medium 34)

Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.

Solution:

Click here Use binary search to find start position and another search to find end. O(log n) time, O(1) space.



Installation

Run make to run python and Swift files.