Median of two sorted arrays

code that i have submitted seems to work fine for two test cases, but failing for others . Need help in where i missed the check for corner cases

for test case three the correct answer is 46 but in solutions it was 42 so my submission is failing.

hi please reply, some of test cases are having wrong answer that is why my code not getting submitted