median of 10 elements is not 5th element but average of 5th and 6th element. But here in sample output median is given as 10/2 ie 5th element.
Median of sorted arrays
@nitin0280, the definition of median in this question might be different to make it easier, so just print the n/2 th element
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.