Hello there guys, I'm new on the platform, so maybe this a known problem or maybe is a mistake made by myself. I'm currently submitting my solutions using Golang, and in three of these submissions I'm having Time limit exceeded on test. This is a common problem when your solution to the problem is very slow, but in my case, I don't think this is the problem. To prove my point I implemented the same algorithm that I was using in Golang, and implemented in Python, and it passed all the test without any problem related to Time limit exceeded on test. I'm inclined to think that there some problem with my Golang implementation, but I don't see the problem really. I will share both implementations in case you have an idea of what could be happening. The problem in which I'm having issues are.
These are my submissions, one in Golang, and the second one in Python. Both implement same algorithm but only the Python is accepted.
Golang
Python
If someone has an idea of what could be happening comment without any problem, maybe is a problem of my implementation in Golang. Here are the other two implementations for the other problems that I'm facing the same issue when I implement them in Golang: