Apply Guaranteed Rate Windows When Transfers Are Funded Late

Last updated: November 29, 2026

Quick Overview

Each quote locks a rate for a validity window. Given quotes, a time series of live rates and a list of funding events, return the rate actually applied to each transfer: the locked rate if funded inside the window, otherwise the latest live rate at funding time.

Wise
Coding & Algorithms
Software Engineer
Wise
November 29, 2026
Software Engineer
Technical Screen
Coding & Algorithms
Easy

0

0

0 solved


Each quote locks a rate for a validity window. Given quotes, a time series of live rates and a list of funding events, return the rate actually applied to each transfer: the locked rate if funded inside the window, otherwise the latest live rate at funding time.

Wise guarantees the exchange rate for a set period after a quote, and customers who pay by slow bank transfer sometimes fund after it expires. The screen checks careful interval boundaries and binary search over a sorted rate history.

What the Interviewer Expects
  • Defines the window as half-open [created, created + valid) and says so
  • Uses binary search for the latest rate at or before a timestamp
  • Returns whether the guarantee applied, not just the rate
  • Handles funding before the first known rate
  • Tests the exact expiry boundary
Key Topics to Cover
binary search
time windows
boundary conditions
rate guarantees
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • Should the guarantee use the time the money left the customer's bank or the time Wise received it?
  • How would you serve this for millions of transfers per day with rates updating every second?
  • If the market moves against Wise inside the window, who bears the cost and how would you hedge?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Quotes map id to (rate, created_at, valid_seconds). Live rates are a list of (timestamp, rate) sorted by time. For each funding (quote_id, funded_at) return (quote_id, rate, guaranteed). I will treat ...

High-Level Design

Inside the window, use the locked rate. Otherwise find the last live rate with timestamp at or before funded_at using bisect_right minus one. Precompute the timestamp list once....


Submit Your Answer
Markdown supported

Related Questions