Rapid7 interview question

it was 1 easy leetcode question