Algorithm · Capital One · Medium
A charitable organization can approach each of $$n$$ prospective donors through one of two channels: an email campaign or an invitation to a fundraising gala. A donor cannot be contacted via both channels. For every donor $$i$$, you are given two probability arrays and two expected-gift arrays: p_online[i] is the chance the donor gives if emailed, and a_online[i] is the expected amount of that gift; p_gala[i] and a_gala[i] are the corresponding values for a gala invitation.…
Checking your access…