Block Interview Question

I was asked an easy LeetCode question.