3 ms·
As a side note, these kinds of tasks are also pretty common in at my university in the practical computer science courses. Often, you aren't supposed to write
by vog 13y ago
As a side note, these kinds of tasks are also pretty common in at my university in the practical computer science courses.
Often, you aren't supposed to write a big thing at once, but you are given some partially working code, with some incomplete set of test cases. You then have to finish the implementation, and you are also encouraged to add more test cases.
I found it especially interesting that the test cases were incomplete on purpose - you are supposed to understand and solve the given task, not just to blindly write some code that happens to pass a given set of tests.