PSHOT NODEJS TLE

Hi,

So I’ve been submitting my nodejs solution like no tomorrow.
However, the judge returns TLE limit and I’m thinking is there any way to speed-up things so that I could reliably use javascript.

I know there was topic earlier about that, but couldn’t get the info i could use.

couple of solutions that hit TLE:

https://www.codechef.com/viewsolution/39833256

https://www.codechef.com/viewsolution/39833115

https://www.codechef.com/viewsolution/39833256

Now I know that many solution will hit the time limit depending on the alogrithm complexity. But when you submit the same algo in C++ like for this example it will accept.

Or it’s actually the algorithm is not so efficient and if so is there anywhere I can look to try to implement other solutions?

Kind regards,
Lukas