Showing:
Handle Score
@Ibrahim Nash 6420
@mb1973 5704
@Quandray 5245
@akhayrutdinov 5111
@saiujwal13083 5046
@sanjay05 3762
@kirtidee18 3673
@marius_valentin_dragoi 3523
@mantu_singh 3510
@sushant_a 3459
Right angled triangles
Easy Accuracy: 47.27% Submissions: 34 Points: 2

Given three integers a, b and c. The task is to check if it is possible to make right angled triangle with sides of length a, b and c.

Example 1:

Input:
a = 3, b = 4, c = 5
Output:
Yes
Explanation:
We can form a right angled triangle
with sides of length 3, 4 and 5.

Example 2:

Input:
a = 2, b = 5, c = 8
Output:
No
Explanation:
We can't form a right angled triangle
with sides of length 2, 5 and 8.

You don't need to read input or print anything. Your task is to complete the function rightAngTri() which takes 3 Integers a,b and c as input and returns "Yes" if it is possible to form a right angled triangle with sides of length a, b, and c, else return "No".

Expected Time Complexity: O(log(max(a,b,c)))
Expected Auxiliary Space: O(1)

Constraints:
1 <= a,b,c <= 108