c++

[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…

[Solved] Successful Pairs of Spells and Potions LeetCode Contest Problem

[Solved] Successful Pairs of Spells and Potions LeetCode Contest Problem

Successful Pairs of Spells and Potions: You are given two positive integer arrays spells and potions, of length n and m respectively, where spells[i] represents the strength of the ith spell and potions[j] represents the strength of the jth potion. You are also given an integer success. A spell and potion pair is considered successful if the product of their…