Mr. Cooper Interview Question

1 coding question from Java.