Notion Labs Interview Question

Standard coding question, very easy