Median of sorted arrays

sir i wrote the code for this question. please check it because it is not passing one test case. is my logic correct?
the link of the code is -

i think code link is not correct

please check the link and send correct one

@asaurabh_26 i am sorry sir. the link is https://ide.codingblocks.com/s/307338
please look into this

this logic is completely wrong
consider this input

5
1 3 4 10 20
5
0 2 5 6 7

your code will give wrong answer for this input

now try to think something more

1 Like

@asaurabh_26 thank u sir. now my program is working and is also accepted.