Tavant interview question

write 2 program based on collection