Three Ships Interview Question

See above summary.