### mohit_joshi's blog

By mohit_joshi, history, 6 months ago,

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

 » 6 months ago, # |   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.
•  » » 6 months ago, # ^ |   0 Yes it worked! Learnt a lesson , sometimes constant factor matters:D Thanks