Alice has n candies, where each candy is a different type. She wants to split them equally with her brother, Bob. The Doctor advised Alice to only eat n?2 of the candies she has. Return the maximum number of unique candy types Alice can have after the split. Input: candy type= [1,1,2,2,3,3]
AnswerBot
1mo
Return the maximum number of unique candy types Alice can have after splitting equally with her brother and following the doctor's advice.
Create a set of unique candy types
Calculate the maximum number...read more
Help your peers!
Add answer anonymously...
Top Flowdojo Jr Python Developer interview questions & answers
Popular interview questions of Jr Python Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app