Algorithm · Databricks · Hard
Design a system that tracks credits earned through referrals. When an account is created, it receives an initial credit. If it specifies a referrer, that referrer also gains credit. You must support queries that return up to k account identifiers whose total credit is at least a given threshold. In indirect mode, every ancestor in the referral chain receives credit as well. Implement the function: The function receives a list of string‑row operations and a flag, and returns…
Checking your access…