3 ms·
Coding challenges involving number-theoretical math have small, simple input cases, and can be stated compactly, yet can be fairly complicated and subtle. They
by kazinator 9y ago
Coding challenges involving number-theoretical math have small, simple input cases, and can be stated compactly, yet can be fairly complicated and subtle. They often have the property that it's easy to test whether a solution is correct. They are also a good way to test someone's understanding of subtleties in requirements; if you misunderstand some key element in the problem, you will solve the wrong thing. Some problems in this area will drag in the use of data structures; you may have to keeps some hashes or lists, or even construct a graph. Or generate permutations, or some sort of tree with backtracking and such; it's not necessarily just numbers and nothing but numbers.