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...
Flowdojo Jr Python Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
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

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter