Intellias interview question

Question involves using Arraylist and Streams API.