Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 82126aa

Browse files
committed
Added README.md file for Check If It Is a Straight Line
1 parent c4f7a79 commit 82126aa

File tree

1 file changed

+32
-0
lines changed
  • 1349-check-if-it-is-a-straight-line

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<h2><a href="https://leetcode.com/problems/check-if-it-is-a-straight-line">Check If It Is a Straight Line</a></h2> <img src='https://img.shields.io/badge/Difficulty-Easy-brightgreen' alt='Difficulty: Easy' /><hr><p>You are given an array&nbsp;<code>coordinates</code>, <code>coordinates[i] = [x, y]</code>, where <code>[x, y]</code> represents the coordinate of a point. Check if these points&nbsp;make a straight line in the XY plane.</p>
2+
3+
<p>&nbsp;</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<p><img alt="" src="https://assets.leetcode.com/uploads/2019/10/15/untitled-diagram-2.jpg" style="width: 336px; height: 336px;" /></p>
9+
10+
<pre>
11+
<strong>Input:</strong> coordinates = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]]
12+
<strong>Output:</strong> true
13+
</pre>
14+
15+
<p><strong class="example">Example 2:</strong></p>
16+
17+
<p><strong><img alt="" src="https://assets.leetcode.com/uploads/2019/10/09/untitled-diagram-1.jpg" style="width: 348px; height: 336px;" /></strong></p>
18+
19+
<pre>
20+
<strong>Input:</strong> coordinates = [[1,1],[2,2],[3,4],[4,5],[5,6],[7,7]]
21+
<strong>Output:</strong> false
22+
</pre>
23+
24+
<p>&nbsp;</p>
25+
<p><strong>Constraints:</strong></p>
26+
27+
<ul>
28+
<li><code>2 &lt;=&nbsp;coordinates.length &lt;= 1000</code></li>
29+
<li><code>coordinates[i].length == 2</code></li>
30+
<li><code>-10^4 &lt;=&nbsp;coordinates[i][0],&nbsp;coordinates[i][1] &lt;= 10^4</code></li>
31+
<li><code>coordinates</code>&nbsp;contains no duplicate point.</li>
32+
</ul>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /