Блог пользователя j1gsaw

Автор j1gsaw, 11 лет назад, По-английски

I don't understand why my code is giving TLE for this question when my complexity is O(nlogn).. Please somebody look at my code and find the bug.

  • Проголосовать: нравится
  • -4
  • Проголосовать: не нравится

»
11 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

It's possible you ran into an "anti-quicksort" test, since Arrays.sort on primitive types in Java 7 has worst case O(n^2) and on others is an O(n log n) mergesort. Unfair I know, but I don't see anything else that could justify so many people failing on test 46.