← ALL NOTES
Array

2818. Apply Operations to Maximize Score

Given nums and k operations. A number's prime score is its count of distinct prime factors. Per operation, choose a subarray, take its element with the maximum prime score (leftmost on ties),…

Loading…