ByteDance interview question

Implement Inverse CDF sampling; find the square root of the given number using gradient descent.