DEV Community

Discussion on: Can you solve the fastest horse 🐴 algorithm problem?

Collapse
 
3cho0 profile image
3cho0

Another fun, but simple exercise:
Find a closed formula that will answer this question for an arbitrary number of horses k and an arbitrary number of racetracks n.
Hint: Look at cases where n divides k first :)