USA | Flexport | Technical Phone Screen
Summary
I completed a 60-minute technical phone screen for a SWE II, Freight Operations role at Flexport in the USA. I was given a practical problem to implement parts of a simplified Splendor game, which I enjoyed, and the interviewer was very helpful.
Full Experience
Interviewed for SWE II, Freight Operations role at Flexport and completed the technical phone screen. Interview was 60 minutes
I was a bit worried the question was leetcode style, but thank god I got asked a practical problem!
The question
You are building a game called Splendor and you will build it part by part as per the interviewer's presentation of the problem. In practice, Splendor is a multiplayer game, but you will implement a simplified version for one player
The interviewer does not provide any test cases. YOU need to come up with that :)
Part 1
- Player has tokens which can have color Yellow, Green, Blue, Red, White
- Implement a function called
can_purchasethat determines if a player is able to purchase a card. For now, cards have a cost like "1R, 2B, 3W" and a player can purchase a card if they have enough tokens
Should be pretty straightforward. Keep the logic simple and don't overthink
Part 2
- You have identified IF a player can purchase a card. Now you need to implement a function called
purchasethat purchases a card for the player. - It's important to keep track of the purchased cards for a player
Think critically about this
Part 3
- So we have a way to purchase a card. Cards have a "color" and the possible values are just like tokens.
- Suppose you have 2 green cards for example and you want to purchase a card costing "1R, 4G, 3W". Cards act like "coupons", so the real cost for purchasing the example card is "1R, 2G, 3W"
- Your goal is to update the code to account for that and add test cases
Reflections
- I actually liked this problem and you don't have to have prior knowledge of Splendor. The interviewer patiently clarified my questions about the problem
- The interviewer also was super chill and yes while there were more parts, solving the parts above was satisfactory to him. We spent 10 minutes on Q/A after the problem
- Clarify the requirements and ensure alignment so that you are on the same page as the interviewer.
Interview Questions (1)
You are building a game called Splendor and you will build it part by part as per the interviewer's presentation of the problem. In practice, Splendor is a multiplayer game, but you will implement a simplified version for one player.
The interviewer does not provide any test cases. YOU need to come up with that :)
Part 1
- Player has tokens which can have color Yellow, Green, Blue, Red, White
- Implement a function called
can_purchasethat determines if a player is able to purchase a card. For now, cards have a cost like "1R, 2B, 3W" and a player can purchase a card if they have enough tokens.
Should be pretty straightforward. Keep the logic simple and don't overthink.
Part 2
- You have identified IF a player can purchase a card. Now you need to implement a function called
purchasethat purchases a card for the player. - It's important to keep track of the purchased cards for a player.
Think critically about this.
Part 3
- So we have a way to purchase a card. Cards have a "color" and the possible values are just like tokens.
- Suppose you have 2 green cards for example and you want to purchase a card costing "1R, 4G, 3W". Cards act like "coupons", so the real cost for purchasing the example card is "1R, 2G, 3W".
- Your goal is to update the code to account for that and add test cases.