My code is giving correct output but showing TLE when submitting.
Please resolve.
Finding median using heaps
mistakes
-
use int instead of float
as it is not mention in question to print median with decimal -
you have to take n no of elelments in every testacase
-
you have to take one element seperately
-
new priority queues should be make for each testcase
modified Code
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved 
if you have more doubts regarding this feel free to ask