My code not being accepted

In your code at line no 22 i think there is a typo, it should be c[k++] not c[i++].
Also you have to observe the sample test case solution a little bit, here the total number of elements are 2*n i.e. even so the median can either at n - 1 or n , so here they have taking the n-1 element as median.

Hope it helps.
Feel free to ask anything if not understood.
Keep Coding!!

1 Like

DEFINETLY it helped.
Thank you

@ayushijaan23 If your problem is solved, i suggest you to please Mark this doubt as Resolved.

1 Like