Top K Frequent Numbers in a stream -Java

Please Help my testcase is not passing.

here:


u were not taking new n and k for each t. define them inside the loop
please mark your doubt as resolved :slight_smile:

1 Like