https://ide.codingblocks.com/s/230511 why my code getting TLE, for 10^5 tescases
Java code(ways to reach nth staircase problem)
@Affan-Mokarram-202031887744398
You have written the power function but not using it anywhere
Your loop on line 16 will obviously give TLE since it runs 10^6 times each time a test case starts
Please look into it
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.