+ 4
Why in the code coach the last three test cases are hidden?
4 Antworten
+ 7
Because if no test cases were hidden, one could simply hardcode the solutions for all the inputs, which is not the point of the code coach problems.
+ 6
In the real world, your code needs to be flexible to all the atrocious forms of input that your clients might provide.
As a practice for that, not all the inputs are shown to you. This allows you to formulate a generally-foolproof algorithm without hard coding all the answers.
Tl;dr So that you won't hardcode and because it's good practice for real life.
+ 1
Oh fine! Then it's so for that one cannot manipulate the code according the problem shown. Hey many thanks! 😊
+ 1
Great! Thanks my friend! 👍👍👍