DEV Community

Discussion on: Interview Question: A two-player card game

 
mortoray profile image
edA‑qa mort‑ora‑y

By "core" solution you mean the 2-player version, and you got a bit stuck on the N-player parts?

Keep in mind that that in the interview I don't let people get stuck. When I see obvious struggles I'll give tips, or possible solutions. As long as it isn't excessive I don't count this against the people in the feedback. It's just a way to move it along and ensure I'm not evaluating people based on one block.

Things like sorting lists, and picking max/min, does some up a lot during interviews though, even the classic algorithm ones. It's also something that comes up quite often in day-to-day coding I find.

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

Not exactly. I built it already thinking it could be scalable to n players, I got stuck literally on the last function, the one that would display the winner, because I got carried away trying solutions to ties, but I guess I would be able to nail it in the 15 minutes I had left if you gave me a hint :P