Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

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

I'm facing problem with this question. I'm getting TLE on test case 19th. I'm doing this question using Tries. Complexity of my code is O(3 * total length of input) which is no where close to getting TLE. Here is my code : http://ideone.com/uNbDf9. Please help

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

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

Doesnt strcpy() run in O(n) time?

  • »
    »
    9 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I have changed my code but i guess the problem would still come as search function takes O(length). Is there any way of solving this question using Tries?