Ladders optimisedapproach

bhaiya said that time complexity for this code is O(N+K) but there is no loop for k it should be O(N)

hello @deepakjumani09
yeah u are right ,it should be O(n) only

Is this problem available on SPOJ or some online platform to submit?

sorry dont know . may be it will be on hackerblocks

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.