Sir i am facing TLE while solving this question

pls tell what changes shall i make to the code

hello @Vaibhav277
you are reading n and m simultaneously.
first read n and then n numbers .
after that read m and then m numbers.

ok sir… let me try with that

tried this as well … still error is coming… can u make changes in this code and share with me

image
increment ur i inside while loop.

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.