Build a loan-volume tracker (sliding 1-hour window)
viaLeetCode
Build a loan-volume tracker with two methods: store_loan(volume) records a loan (with the volume amount) at the moment it arrives, and get_loan_volume() returns a summary (e.g. total volume, or count) of loans from the last hour relative to now. Start with any correct solution; no complexity target initially.
asked …