Hey Steve, would you mind doing problem #51 N-Queens from leetcode? It's a real head scratcher! Much appreciated!
@huizhao2050 Жыл бұрын
You could use substring method to determine if the short string is a substring of the long string, then find the first char's index or the last char's index
@FisherCoder Жыл бұрын
Right, you could, but that kind of defeats the purpose of this problem which I assume is to practice one's string manipulation abilities, also delegating an algorithm to a language's built-in APIs isn't necessarily more efficient than we write from scratch. Happy LeetCoding!