Reddit Interview Question

A basic leetcode-easy style question. Absolutely nothing difficult whatsoever.