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

Автор ThoughtNerd, история, 3 года назад, По-английски

I can't find the time complexity of the following program. Even I can't find a way to calculate its complexity with master theorem. Please help me about how to calculate it. Thanks

My submission : https://codeforces.com/contest/128/submission/114386842

Problem link : https://codeforces.com/contest/128/problem/B

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

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

When execute loop , Value of K decreasing And When K == 0 base case is true and function returns. So time complexity is O(klogn) for sorting