Design and implement a class (OOP/OOD style) that calculates the amount of tax paid given a progressive (bracket-based) tax rate system. You are given a list of tax brackets (each with an upper income bound and a tax rate), and must compute the total tax owed for a given income. The solution must be written as a complete, runnable class including a main() function or test harness that can execute and pass provided (or self-written) test cases. The problem is associated with the 1point3acres problem 'Calculate Amount Paid in Taxes' (Snowflake phone screen variant).
There are follow-up questions on this problem (referenced as existing in community summaries); exact content not fully disclosed in reports.
Write your own test cases and run them in main() to demonstrate correctness.
| Approach | Notes |
|---|---|
| Binary search on brackets | Useful if the number of brackets is large; finds the relevant bracket quickly but adds implementation complexity without meaningful benefit for typical small bracket lists. |
Common mistakes: Having a small bug that was only fixed in the last few minutes of the interview — failing to produce a bug-free solution during the session — led to a required additional round and eventual rejection.; Only practicing LeetCode-style solutions without practicing writing full OOP classes (including test harnesses) left candidates underprepared for Snowflake's format.
Interviewer hints: Some interviewers prepare their own test cases and run them against your class; others explicitly ask you to write your own tests in main(). Candidates should be ready for either variant.; The round is structured as one problem per round with follow-up questions; the follow-ups for this problem are documented in community summaries on 1point3acres.
What passers do: Writing a complete, runnable class including a main() function that executes and passes test cases — even if the OOP design is not polished — was enough to pass.; Candidates who had seen the problem before and could implement it directly did well, since it is a known recurring question in the Snowflake phone screen pool.
Why people fail: Having small bugs that take until the last few minutes to fix, signaling lack of confidence/fluency; Not being able to demonstrate a runnable solution
Edge cases probed: Income of 0; Income exactly at a bracket boundary; Income exceeding all brackets (top bracket behavior)
What you just read — canonical solution, follow-up arc, what passing candidates actually did — exists for all 103 Snowflake questions, refreshed monthly from new candidate reports.