question link
my submission
it is passing 31 test cases out of 41
can you tell me why is it so?
question link
my submission
it is passing 31 test cases out of 41
can you tell me why is it so?
hello @shivammishra20121999
set allows only unique values but for median repeated values also plays an important role so use multiset and then try
@aman212yadav
i have changed but it still getting 32 test case passed
6
Output:
[8.00000,6.00000,8.00000,8.00000,2.50000]
Expected:
[8.00000,6.00000,8.00000,8.00000,5.00000]
failing in this
s.erase(*vtr) will erase all the occurence of *vtr from the set which we dont want right?
to make each element unique store index along with their value in multiset.
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.