For the best experience, increase the window size or view on a laptop or desktop device
Last updated: Pending
Title | ||
|---|---|---|
Loading... | ||
1/1
No questions are available yet
For the best experience, increase the window size or view on a laptop or desktop device
Title | ||
|---|---|---|
Loading... | ||
Given a sorted array of string and a prefix, return the index of the first string that starts with prefix. Return -1 if there's no such string. Note that strings are case sensitive.
Example:
Input: ["ab","app","apple","bbb"]
prefix = "ap" return 1
prefix = "aP" return -1
prefix = "b" return 3
Given a sorted array of string and a prefix, return the index of the first string that starts with prefix. Return -1 if there's no such string. Note that strings are case sensitive.
Example:
Input: ["ab","app","apple","bbb"]
prefix = "ap" return 1
prefix = "aP" return -1
prefix = "b" return 3
Output