Five Rings Interview Question

coin flip problem