Catalist, LLC Interview Question

Write an algorithm