AudienceView interview question

Basic Java question, Spring related question. They asked algorithm and need to do coding on a shared note.