Answer In c++ only. Rohit is working in the Multinational company named Accenture. He has empty boxes lying on the floor in a row. The size of the boxes is provided in the form of identical members a....


Answer In c++ only.<br>Rohit is working in the Multinational company named Accenture. He has empty boxes lying on the<br>floor in a row. The size of the boxes is provided in the form of identical members a. The size of the<br>ith box is indicated by [i]. Since Rohit has a small room, there is a shortage of space. Therefore, he<br>should reduce the number of lower boxes by inserting the box into another box at least twice the<br>current box i.e. if we have to insert that box into the jth box then (2 * a [i]) <= a [j]. Each box can<br>contain one box and a box stored in another box cannot hold any box itself. Find the minimum<br>number of boxes left behind after placing boxes in each other.<br>Sample Input:<br>16<br>1<br>4<br>2<br>Sample Output:<br>3<br>

Extracted text: Answer In c++ only. Rohit is working in the Multinational company named Accenture. He has empty boxes lying on the floor in a row. The size of the boxes is provided in the form of identical members a. The size of the ith box is indicated by [i]. Since Rohit has a small room, there is a shortage of space. Therefore, he should reduce the number of lower boxes by inserting the box into another box at least twice the current box i.e. if we have to insert that box into the jth box then (2 * a [i]) <= a="" [j].="" each="" box="" can="" contain="" one="" box="" and="" a="" box="" stored="" in="" another="" box="" cannot="" hold="" any="" box="" itself.="" find="" the="" minimum="" number="" of="" boxes="" left="" behind="" after="" placing="" boxes="" in="" each="" other.="" sample="" input:="" 16="" 1="" 4="" 2="" sample="" output:="">

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here