Compute CDF from a PDF Function | Uber Interview Question