mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-12 10:51:42 +08:00
批量更新数据
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
<ul>
|
||||
<li><code>WordFilter(string[] words)</code> 使用词典中的单词 <code>words</code> 初始化对象。</li>
|
||||
<li><code>f(string pref, string suff)</code> 返回词典中具有前缀 <code>prefix</code> 和后缀 <code>suff</code> 的单词的下标。如果存在不止一个满足要求的下标,返回其中 <strong>最大的下标</strong> 。如果不存在这样的单词,返回 <code>-1</code> 。</li>
|
||||
<li><code>f(string pref, string suff)</code> 返回词典中具有前缀 <code>pref</code> 和后缀 <code>suff</code> 的单词的下标。如果存在不止一个满足要求的下标,返回其中 <strong>最大的下标</strong> 。如果不存在这样的单词,返回 <code>-1</code> 。</li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
@@ -19,7 +19,7 @@
|
||||
[null, 0]
|
||||
<strong>解释</strong>
|
||||
WordFilter wordFilter = new WordFilter(["apple"]);
|
||||
wordFilter.f("a", "e"); // 返回 0 ,因为下标为 0 的单词:前缀 prefix = "a" 且 后缀 suff = "e" 。
|
||||
wordFilter.f("a", "e"); // 返回 0 ,因为下标为 0 的单词:前缀 prefix = "a" 且 后缀 suffix = "e" 。
|
||||
</pre>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user