the frequency element number time occur arrayyou give integer array num integer k in operation choose index num increment element index 1return maximum possible frequency element perform k operation Example 1input num 124 k 5output 3explanation Increment element times second element time num 4444 frequency 3example 2input num 14813 k 5output 2explanation there multiple optimal solution increment element time num 44813 4 frequency 2 increment second element time num 18813 8 frequency 2 Increment element time num 141313 13 frequency 2example 3input num 396 k 2output 1 Constraints1 numslength 1051 numsi 1051 k 105