Calculate Tax in a Progressive Marginal Tax System
Company: Interactive Brokers
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Online Assessment
Overview: Practice a Interactive Brokers coding interview problem focused on calculate tax in a progressive marginal tax system. The prompt emphasizes edge cases, clean implementation, and verifiable test behavior without revealing the solution.
Read the full Interactive Brokers Software Engineer interview experience this question came from
Examples
Input: {"brackets":[[0,0.1],[10000,0.2],[50000,0.3]],"income":60000}
Expected Output: 12000.0
Explanation: Progressive sample.
Input: {"brackets":[[0,0.1]],"income":100}
Expected Output: 10.0
Explanation: One bracket.