Company: Flipkart_9nov
Difficulty: medium
Basket Ball Arrangement Problem Description On an Annual Sports Day hosted by a reputed school, they have planned a game. To conduct the game two boxes are placed on a playground. On the other side of the ground, two more baskets full of different colors are kept in a basket. Kids have to assemble the balls in the boxes according to the game rules as given below: I) Participating kids will be provided with two numbers b and p i.e. the number of boxes b for the round and the total number of balls to be used in that round. II) Arrange b boxes from left to right. They have to arrange p balls in two ways W1 and W2. W1: This would be the way in which the balls need to be arranged in boxes such that the first box from left contains the highest number of balls while the last box may contain the lowest number of balls and the number formed after arranging the balls should be the highest possible b-digit number. W2: This will be the way in which the balls need to be arranged in boxes such that