Hacker News new | ask | show | jobs
by Ygg2 4114 days ago
By requiring to terminate and return a result?
1 comments

Of course. Just test to see if the program terminates or not.
While halting problem can't be solved, you can solve the problem by saying all programs must terminate within 20min and program must scale with input length.

And/Or you can forbid sleep and similar nop functions.

And/Or you can sit down and analyze the code.

Truth be told, it makes for a very boring competition, but a very useful exercise.