If Frequency of element < remaining choices , select all of these elements , else select only the number of elements required
let toSelect = Math . min ( remaining_choices , frequency ) ; ans = ans * NCR ( frequency , toSelect ) ;