Count Occurrences of an Element in a Sorted Array
Given a sorted array of n elements, possibly with duplicates, find the number of occurrences of a target element.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid October, 2026
Meta
Staff
Given a sorted array of n elements, possibly with duplicates, find the number of occurrences of the target element.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.