Python --- 1078. Occurrences After Bigram 解题报告
Posted 杨鑫newlfe
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python --- 1078. Occurrences After Bigram 解题报告相关的知识,希望对你有一定的参考价值。
Given two strings first
and second
, consider occurrences in some text of the form "first second third"
, where second
comes immediately after first
, and third
comes immediately after second
.
Return an array of all the words third
for each occurrence of "first second third"
.
Example 1:
Input: text = "alice is a good girl she is a good student", first = "a", second = "good" Output: ["girl","student"]
Example 2:
Input: text = "we will we will rock you", first = "we", second = "will" Output: ["we","rock"]
Constraints:
1 <
以上是关于Python --- 1078. Occurrences After Bigram 解题报告的主要内容,如果未能解决你的问题,请参考以下文章