Skip to content

Commit 586c2e0

Browse files
committed
Upload 126
1 parent 95553fb commit 586c2e0

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ To make the daily tasks of creating a new file and updating the index easier, th
159159
| 123 | [Customers Who Bought All Products](https://leetcode.com/problems/customers-who-bought-all-products/description/) | [Solution](solutions/123_customers_who_bought_all_products.md) | LeetCode | Medium | |
160160
| 124 | [The Number of Employees Which Report to Each Employee](https://leetcode.com/problems/the-number-of-employees-which-report-to-each-employee/description/) | [Solution](solutions/124_the_number_of_employees_which_report_to_each_employee.md) | LeetCode | Easy | |
161161
| 125 | [Primary Department for Each Employee](https://leetcode.com/problems/primary-department-for-each-employee/description/) | [Solution](solutions/125_primary_department_for_each_employee.md) | LeetCode | Easy | `UNION` |
162+
| 126 | [Triangle Judgement](https://leetcode.com/problems/triangle-judgement/description/) | [Solution](solutions/126_triangle_judgement.md) | LeetCode | Easy | Triangle Inequality Theorem |
162163

163164
## Author(s)
164165

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SQL Everyday \#126
2+
3+
## Triangle Judgement
4+
5+
Site: LeetCode\
6+
Difficulty per Site: Easy
7+
8+
## Problem
9+
10+
Report for every three line segments whether they can form a triangle.
11+
12+
Return the result table in *any order*. [[Full Description](https://leetcode.com/problems/triangle-judgement/description/)]
13+
14+
## Submitted Solution
15+
16+
```sql
17+
-- Submitted Solution
18+
SELECT
19+
x
20+
,y
21+
,z
22+
,IF(x + y > z AND x + z > y AND y + z > x, 'Yes', 'No') AS triangle
23+
FROM Triangle
24+
;
25+
```
26+
27+
## Site Solution
28+
29+
```sql
30+
-- LeetCode Solution
31+
-- Site solution essentially the same.
32+
```
33+
34+
## Notes
35+
36+
TODO
37+
38+
Go to [Table of Contents](/README.md#contents)\
39+
Go to [Overview](/README.md)

0 commit comments

Comments
 (0)