Merkle Interview Question

How are ads ranked by Google?