Pythagoras triplet

how to reduce timelimit in testcase:1,2;

Hello @sindhu_21,

I would suggest you to watch the video: Pythagorean Triplet Hint of your course.
They have explained a constant time approach for it.

BTW, i cannot say anything about your approach unless you will share it with me.

sir this is my code: https://ide.codingblocks.com/s/145119

Hey @sindhu_21,

As i pointed in my previous reply, your code is failing for large values.
Your code is exceeding timelimit of the question.

Your approach is logically correct but you have to think of a more efficient approach.
For that, watch the video: Pythagorean Triplet Hint.

Let me know if you don’t understand anything.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.