i need help regarding a problem from learning section

I used merge sort, quick sort, and count sort to sort the arrays in java but end up with TLE(2.01S). I’m not getting where I’m getting wrong.
problem code: CNTSORT
MY SUBMISSIONS: https://www.codechef.com/viewsolution/61792349

I got error 403: Access denied! You don’t have permissions for this page, when I clicked the attached link.

Can you share it through an editor like https://ideone.com/ ?

thank you for your reply.
yes, sure I’m sharing the code in the below link:

even after using buffered reader to get input, I’m getting TLE(20.1s)

Check the following update to your code.

Accepted

1 Like

THANK YOU SO MUCH @codingknight .
code is much-advanced level, I think, it will take time for me to understand.
thank you for the solution.

With pleasure. The following is the rest of my Java template for fast data input-output that includes other basic data types.

https://ideone.com/4ecPtm

Check the following blogs about this issue.

  1. Fast I/O in Java in Competitive Programming

  2. Fast I/O In Java For Competitive Programming

  3. Fast Output in Java