mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 15:31:43 +08:00
update
This commit is contained in:
20
leetcode/problem/valid-boomerang.html
Normal file
20
leetcode/problem/valid-boomerang.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<p>Given an array <code>points</code> where <code>points[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> represents a point on the <strong>X-Y</strong> plane, return <code>true</code> <em>if these points are a <strong>boomerang</strong></em>.</p>
|
||||
|
||||
<p>A <strong>boomerang</strong> is a set of three points that are <strong>all distinct</strong> and <strong>not in a straight line</strong>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<pre><strong>Input:</strong> points = [[1,1],[2,3],[3,2]]
|
||||
<strong>Output:</strong> true
|
||||
</pre><p><strong>Example 2:</strong></p>
|
||||
<pre><strong>Input:</strong> points = [[1,1],[2,2],[3,3]]
|
||||
<strong>Output:</strong> false
|
||||
</pre>
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>points.length == 3</code></li>
|
||||
<li><code>points[i].length == 2</code></li>
|
||||
<li><code>0 <= x<sub>i</sub>, y<sub>i</sub> <= 100</code></li>
|
||||
</ul>
|
Reference in New Issue
Block a user