Chocolate Problem Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that...

read more
CodingNinjas
author
2y
RecursionThe idea is that generate all the possible subsets of size ‘M’ and checks the minimum difference that can be possible from all subsets.  This problem can be solved using recursion a...
see more
CodingNinjas
author
2y
Sliding WindowThe idea is based on the observation that to minimize the difference between a maximum number of chocolate in a packet and a minimum number of chocolate in the packet is that, always cho...
see more
Help your peers!
Add answer anonymously...
Google Software 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 © 2023 Info Edge (India) Ltd.

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