  Showing: Handle Score
@Ibrahim Nash 5761
@akhayrutdinov 5111
@mb1973 4989
@Quandray 4944
@saiujwal13083 4506
@sanjay05 3762
@marius_valentin_dragoi 3516
@sushant_a 3459
@verma_ji 3341
@KshamaGupta 3318
Min value of x
Basic Accuracy: 13.63% Submissions: 22 Points: 1

Given 4 integers a,b,c and k . Find the min(non-negative Integral) value of x such that ax2+bx+c >= k.

Example 1:

Input: a = 4, b = 6, c = 5, k = 5
Output: 0
Explanation: 4*(0)2+6*0+5 = 5 which is
>= 5.

â€‹Example 2:

Input: a = 1, b = 2, c = 3, k = 4
Output: 1
Explanation: 1*(1)2+2*1+3 = 6 which is
â€‹>= 4.

You don't need to read input or print anything. Your task is to complete the function minX() which takes a, b, c and as inputs and returns the answer.

Expected Time Complexity: O(log k)
Expected Auxiliary Space: O(1)

Constraints:
1 ≤ a, b, c ≤ 105
1 ≤ k ≤ 109

### Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

#### My Submissions:  