Median of two sorted arrays

Can you please share the logic of the program.

hi @singhsaurabhlps7_18d9f31919917399
a brute force way would be to combine both the arrays, sort them and then simply print the middle element…
refer this code -->

1 Like

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.