Help me in solving FRUITS problem

My issue

Chef and fruits

Problem Link: Chef and Fruits Practice Coding Problem