Company: Confluent_6nov
Difficulty: medium
Capable Machine Learning Models Problem Description Given n machine learning models, each with an associated cost and feature compatibility: cost[i] represents the cost of the i th model featureAvailability[i] is a binary string indicating suitability for two distinct features: "00": not equipped for either feature "01": suitable for feature A but not feature B "10": suitable for feature B but not feature A "11": suitable for both features A set of models is k-capable if the number of models suitable for feature A and the number suitable for feature B are both greater than or equal to k . For each value of k from 1 to n , determine the minimum cost required to assemble a k-capable set of models. Return an array of n integers, where the i th integer represents the minimum cost for an i -capable set. If no i -capable set exists, the i th integer should be -1. Examples Example 1: Input: n = 4 cost = [3, 6, 9, 1] featureAvailability = ["10", "01", "01", "10"] Output: [7, 19, -1, -1] Explan