Poker Hand Comparison With Custom Ranking
Asked at Rippling · Coding Questions · Difficulty: Medium · Last asked May 29, 2026
You are writing the referee for a small card game. Each player is dealt a hand of four cards written as a string of digits `'1'` to `'9'`, where `'9'` is the highest card. A hand has a type, and the stronger type wins; if the types are equal, the cards are compared position by position. The rules differ from normal poker, so follow the ones below exactly.
Loading the problem…
More Rippling interview questions
- Design a Hotel Booking System with External Inventory
- Design a User Behavior / Metrics Monitoring Aggregator
- Runnable Stack Overflow / Quora REST Service
- Project Deep Dive and Hiring-Manager Behavioral Round
- Median of Two Sorted Arrays
- Delivery Billing System: Cost, Pay-Up-To, 24h Active Drivers