Loading Company...
This is a verified interview question from Microsoft-oa. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Find First and Last Position of Element in Sorted Array" covers key patterns like Other.
"Given an array of integers `nums` and an integer `target`, return the indices of the first and last occurrence of `target` in `nums`. If `target` is not found in `nums`, return `[-1, -1]`. "
Join thousands of developers practicing for Microsoft-oa.