Shrine Software Interview Question

based on collection framework in java