mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -11,17 +11,17 @@
|
||||
<p>Given <code>bottom</code> and <code>allowed</code>, return <code>true</code><em> if you can build the pyramid all the way to the top such that <strong>every triangular pattern</strong> in the pyramid is in </em><code>allowed</code><em>, or </em><code>false</code><em> otherwise</em>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
<img alt="" src="https://assets.leetcode.com/uploads/2021/08/26/pyramid1-grid.jpg" style="width: 600px; height: 232px;" />
|
||||
<pre>
|
||||
<strong>Input:</strong> bottom = "BCD", allowed = ["BCC","CDE","CEA","FFF"]
|
||||
<strong>Output:</strong> true
|
||||
<strong>Explanation:</strong> The allowed triangular patterns are shown on the right.
|
||||
Starting from the bottom (level 3), we can build "CE" on level 2 and then build "E" on level 1.
|
||||
Starting from the bottom (level 3), we can build "CE" on level 2 and then build "A" on level 1.
|
||||
There are three triangular patterns in the pyramid, which are "BCC", "CDE", and "CEA". All are allowed.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
<img alt="" src="https://assets.leetcode.com/uploads/2021/08/26/pyramid2-grid.jpg" style="width: 600px; height: 359px;" />
|
||||
<pre>
|
||||
<strong>Input:</strong> bottom = "AAAA", allowed = ["AAB","AAC","BCD","BBE","DEF"]
|
||||
|
Reference in New Issue
Block a user