Company: Rippling_23oct
Difficulty: medium
Capable Models Problem Description You are given n machine learning models, each with a cost and a compatibility profile: cost[i] is the cost of the i-th model. featureAvailability[i] is a binary string describing which of two distinct features the model supports: "00": supports neither feature "01": supports feature A only "10": supports feature B only "11": supports both features A collection of models is called k-capable if at least k of the chosen models support feature A and at least k of them support feature B. For every value of k from 1 to n, find the cheapest way to assemble a k-capable collection of models. Return an array of n integers where the i-th entry is the minimum cost of an i-capable collection, or -1 if no such collection exists. Complete the function getMinimunCost in the editor with the following parameters: int cost[] : the cost of each machine learning model string featureAvailability[] : each model's compatibility string describing support for the two features