Luminar Interview Question

Solve an easy-ish leetcode style question.