InterviewDB
Question
Credit Score System: Design a Class That Tracks User Transactions and Updates Credit Score
phone
Question Details
Problem Design a CreditScoreSystem that manages user credit scores. Starting score is 700 for every new user. Implement the following operations: add_user(user_id) -- register a new user. record_payment(user_id, on_time: bool) -- on-time payment adds 10 points; missed payment subtracts 40 points. Score is clamped to [300, 850]. get_score(user_id) -> int -- return current score. top_k(k: int) -> list[str] -- return the k users with the highest scores (ties broken by user_id lexicographically). Ex…
Full Details
🔒
Unlock all Sofi questions
Full insider details, leaked discussions, and candidate experiences.
or every company, $100/year →About This Question
This is a reported interview question from a sofi interview during the phone round.