![]() |
VOOZH | about |
Given three angles. The task is to check if it is possible to have a triangle of positive area with these angles. If it is possible print "YES" else print "NO".
Examples:
Input : ang1 = 50, ang2 = 60, ang3 = 70 Output : YES Input : ang1 = 50, ang2 = 65, ang3 = 80 Output : NO
Approach: We can form a valid triangle if the below conditions satisfies:
Below is the implementation of the above approach:
YES
Time complexity: O(1)
Auxiliary Space: O(1)