## Algorithm Problem: Ranking a Poker Hand

This was a fun problem: create a program to rank a 5-card poker hand, e.g. “Royal Flush”.  Given two poker hands, be able to determine which one is the winner. My first implementation took about an hour, but failed to include code for tie-breaking hands with equal rankings.  It wasn’t difficult to modify my original Read More …

## Algorithm Problem: Email Batches

The person who told me about this problem ran into a bug in a web service for sending a collection of emails.  If the collection contained more than one email addressed to the same recipient, an error would occur.  He needed to write an algorithm which processes a collection such that it organizes emails into Read More …

## Algorithm Problem: Houses

This is an interesting maximization problem that can be solved efficiently, in O(n) time, using dynamic programming. You’re given a list of houses, each with a money value assigned to it. The problem is to choose houses from the list so as to maximize the total money from them, but no two houses chosen can Read More …