Rapid7 Interview Question

it was 1 easy leetcode question