RBC Interview Question

Why RBC, and write the code for them