this post was submitted on 04 Jul 2023
15 points (100.0% liked)

Programming

13385 readers
1 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

I've found this interview question at GeeksForGeeks and decided to actually code it in C++. The program currently prints the "value" of the horses (which is inaccessible by the coder so they can't just look up who is number 1) and then proceeds to sort them and find the position of numbers 1,2 and 3 in a 5x5 matrix with the solution being a minimum of 7 races.

Here's the Github repo: https://github.com/Shroomerian/HorseRacing

you are viewing a single comment's thread
view the rest of the comments
[–] Double_A@discuss.tchncs.de 3 points 1 year ago

I really hate those kind of questions. They mostly have nothing to do with coding, and are really just a mathematical puzzle. Also most people are not able to figure those out on their own, and then everyone just ends up memorizing things.