ByteDance interview question

Search range in a sorted array