Pack 51 apples in minimum number of packets such that with the packets I have made, I should be able to give any number of apples between 1 and 51
AnswerBot
1y
The minimum number of packets required to pack 51 apples such that any number of apples between 1 and 51 can be given.
The minimum number of packets required is 6.
Each packet should contain a power of ...read more
Muneesh waran
3mo
Total 1^2 + 2^2 + .... + 2^5 = 51 Thus, we need 6 packets: one each containing 1, 2, 4, 8, 16, and 20 apples. With these packets, we can make any amount of apples from 1 to 51 by combining them appro...read more
Vineet Kumar
3y
6
no. of packets are : 2,3,4,8,16,32 using these no. of packets able to cover all number of apples between 1-51.
Add answer anonymously...
Top NetApp Software Engineer interview questions & answers
Popular interview questions of Software Engineer
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