Company: wipro_2nov
Difficulty: medium
Picnic Basket Sandwich Challenge Problem Description Aanya is getting ready for the school's yearly picnic and wants to bring along as many sandwiches as she can for her friends. Her picnic basket can hold up to a total weight of 'w'. The cafeteria offers 'n' sandwiches, each with its own weight given in the weight array. Since she wants to share with as many friends as possible, Aanya cares only about squeezing in the greatest possible count of sandwiches, regardless of filling or flavor. Return the maximum number of sandwiches Aanya can place in her basket. Input Format: The first line contains one integer 'n', the number of sandwiches. Each of the next 'n' lines contains an integer, weight of the i th sandwich. The next line contains an integer 'w', the weight capacity of the basket. Output Format: Return the maximum number of sandwiches that Aanya can put in her basket. Examples Example 1: Input: 5 2 9 8 2 7 20 Output: 4 Explanation: Choosing sandwiches weighing [2, 2, 7, 8] adds u