Shrine Software interview question

based on collection framework in java