RBC Interview Question

Probability question, programming, finance