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.
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.
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)
1 <= a,b,c <= 108
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?Yes