Re:Stop Eliminating Perfectly Good Candidates by Asking Them...
by tomjupiter on Saturday June 03, 2023 @04:59PM
(#36180468)
I think hahamrfunnyguy must have meant "convert the numbers to strings" - that's the only way I can make sense of it. quiz.txt must contain code, not sample data.
[ Parent
| on HN ]
Re:Stop Eliminating Perfectly Good Candidates by Asking Them...
by hahamrfunnyguy on Tuesday June 06, 2023 @09:29AM
(#36212402)
Yes, quiz.txt was the start of a C# program with a main method and a function that was called to do the work asked.
The common string based solution was to use a for loop, convert the counter to a string, parse the digits converting each one to a an integer and performing the calculation.
The exercise was given in C# so candidates just use string interpolation to output the result