LeetCode

[Solved] Calculate Amount Paid in Taxes LeetCode Contest Problem

[Solved] Calculate Amount Paid in Taxes LeetCode Contest Problem

Calculate Amount Paid in Taxes: You are given a 0-indexed 2D integer array brackets where brackets[i] = [upperi, percenti] means that the ith tax bracket has an upper bound of upperi and is taxed at a rate of percenti. The brackets are sorted by upper bound (i.e. upperi-1 < upperi for 0 < i < brackets.length). Tax…