You are given a positive integer k. You start with an array nums = [$1$].
In one operation, you can perform either of the following actions:
Choose an element in nums and increment its value by
Select an element in nums and append a duplicate copy of it to nums.
Return the minimum number of operations required to make the sum of the elements in nums greater than or equal to k.
Constraints:
k
You are given a positive integer k. You start with an array nums = [$1$].
In one operation, you can perform either of the following actions:
Choose an element in nums and increment its value by
Select an element in nums and append a duplicate copy of it to nums.
Return the minimum number of operations required to make the sum of the elements in nums greater than or equal to k.
Constraints:
k