- 3buj
- 2024-03-29 12:06:26 @
Prerequisite : Bruteforce
Problem statement summary : You are given 3 integers A, B, C representing the length of three straight lines. You have to tell if you can make a triangle with these lines.
Solution : We can make a triangle if and only if following condition satisfied:
- A + B > C
- A + C > B
- B + C > A
Because we know that, sum of any two sides strictly greater than other side.
Time Complexity : O(1)
0 comments
No comments so far...
Information
- ID
- 1047
- Difficulty
- 3
- Category
- Beginners দেখানোর জন্য ক্লিক করুন
- Tags
- (None)
- # Submissions
- 86
- Accepted
- 45
- Accepted Ratio
- 52%
- Uploaded By