TIGRA Informatika interview question

Complete the task with Java list methods.