Company: Microsoft_12july
Difficulty: medium
Choose Fleets Problem Description Given an integer denoting a total number of wheels, find the number of different ways to choose a fleet of vehicles from an infinite supply of two-wheeled and four-wheeled vehicles such that the group of chosen vehicles has that exact total number of wheels. Two ways of choosing vehicles are considered to be different if and only if they contain different numbers of two-wheeled or four-wheeled vehicles. Complete the function chooseFleets in the editor below. The function should return an array of integers representing the answer for each wheels[i] . chooseFleets has the following parameter(s): wheels[0]...wheels[n-1] : an array of integers Examples Example 1: Input: wheels = [4,5,6] Output: [1,0,2] Explanation: For wheels = 4 , we can have 1 four-wheel or 2 two-wheel to have 4 wheels. The output is 1. For wheels = 5 , we cannot have 5 wheels. The output is 0. For wheels = 6 , we can have 1 four-wheel and 1 two-wheel or 3 two-wheel vehicles. The output