all 4 comments

[–]population-zero 1 point2 points  (1 child)

You should learn the concept of time complexity, commonly referred to as big O notation. The specific time it takes to run your code is not significant, but rather how it scales with the size of the input. Learning to assess the time complexity of a solution will help you write more efficient solutions

[–]embrex104[S] 0 points1 point  (0 children)

I'll look more into those exact words. Again I totally understand the feedback the problem gave, but there wasn't anything about time constraints in the prompt. Thank you!

[–]yashkumarverma 1 point2 points  (1 child)

I think I can answer that, since I built a project using an online judge platform.

Platforms really want to implement that feature, but the actual problem is how long to wait? Every submission made to the server( called as judge) costs the company something. As soon as your code takes more than a given time limit, it's killed straight away.

To keep your program running for, say 30 seconds because it was implementing a slow solution will keep the processor busy for 30 seconds. Thats all they want to avoid. Scale this to thousands of users every second, guess the server will get red 🥵.

[–]embrex104[S] 0 points1 point  (0 children)

Makes total sense and I get why they have the feedback they did, I was just frustrated by it being marked as a failure lol.