GumRoad Interview Question

Technical question - create an algorithm