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

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

Problem link I have applied the same approach as mentioned in the editorial , but I am still getting TLE.I need some hints about where I am doing wrong. Mycodelink Thanks for the help in advance.

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

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

Constant factors matter. While your solution technically has the correct time complexity, there's no need to use maps in your data struct, you could use arrays of size 3 instead, which speeds up your solution considerably.