Company: Oracle_27oct
Difficulty: medium
Ensemble Model Selection Problem Description A machine learning team is building ensembles by selecting models based on their accuracy scores, given in the array modelAccuracies of size n . An ensemble is a selection of models. It is valid when both of the following hold: it contains at least minModels models; every model in it has an accuracy score inside the inclusive range [minAccuracy, maxAccuracy] . Report the number of valid ensembles. Models are distinct entries of modelAccuracies : two selections of different model indices are different ensembles even when the accuracy scores are the same. Function Signature Complete the function countValidEnsembles : modelAccuracies : the accuracy scores of the n available models. minModels : the minimum number of models an ensemble must contain. minAccuracy , maxAccuracy : the inclusive accuracy band. Returns an integer: the number of valid ensembles. Input Format The first line contains the integer n . The second line contains the n values o