Robinhood's referral program lets existing users refer new users to the platform. Given two parallel arrays — rh_users (referrers) and new_users (the users being referred) — referrals are processed in order. The referral chain propagates: if A refers B and B refers C, then C counts toward both A's and…