|
|
|
|
|
by guccihat
515 days ago
|
|
I think the interviewers were looking for the key insight that a number is divisible by 3 iff the sum of the individual digits is divisible by 3. That is easy to verify, even constrained to using single digit data types. To be clear, I am not saying this was a great interview question and I agree the solution OP came up with is impressive. |
|
And how do easily verify this divisibility when "Numeric types, number literals and their associated methods and operations are forbidden?"