could you please help me in understanding what is wrong with the below code(link)
I am getting run-error while submitting it for one of the assignments whereas for the sample input this code is running fine.
could you please help me in understanding what is wrong with the below code(link)
I am getting run-error while submitting it for one of the assignments whereas for the sample input this code is running fine.
Hello @mridulpant your code is in python and python is slow.
you should do the code in c++ or ny other efficient language.
Happy Learning!!
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.
hello , i am facing trouble with my python code as i am getting run time error. could you please check and let me know what could be the issue
handle the case when list size is 0.
in that case u will not be given any list in input and hence ur program will crash.
k=int(input())
arr1=list(map(int,input().split()))
m=int(input())
arr2=list(map(int,input().split()))
here add a check k>0
similary m>0
otherwise no need to read list
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.