My question is exactly the same as this, I tried to incorporate K in my code like this:
int minimal_k(vector& nums, int i, int k) { if (i == 0)