Given a sorted array of strings that is interspersed with empty strings, write a method to find the location of a given string.
Example1:
Input: words = ["at", "", "", "", "ball", "", "", "car", "", "","dad", "", ""], s = "ta" Output: -1 Explanation: Return -1 ifs
is not inwords
.
Example2:
Input: words = ["at", "", "", "", "ball", "", "", "car", "", "","dad", "", ""], s = "ball" Output: 4
Note:
1 <= words.length <= 1000000