3 ms·
It's equally valid — your reasoning exceeds our expectation for the question. Essentially we're trying to test for whether you can understand at least one corre
by ankrgyl 5y ago
It's equally valid — your reasoning exceeds our expectation for the question. Essentially we're trying to test for whether you can understand at least one correct implementation.
Whether or not your approach is "better" depends on factors that aren't part of the problem statement, so it would be a mistake to assess it as incorrect.