The role was RS. I got a new coding problem, a card game. The first three parts were: first, implement a comparison where three of a kind > pair > high card; second, add a new hand so the order becomes three of a kind > flush > pair > high card; third, a discard rule (the rule I got is not quite the same as the one people posted on the forum, mine was to discard if it is not a pair). You can use the framework they give you or rewrite everything yourself. J, Q and K are represented as 11, 12 and 13, and you have to return the log of the whole process, which is fairly complicated.
Please leave room for the later interfaces when you write the first part, otherwise changing it afterwards is extremely painful. My feeling is that the interviewer was testing your OOD design thinking, i.e. whether you design for extensibility for new requirements down the road.
Discussion
Loading comments…