you give 0indexed 2D integer array bracket bracketsi upperi percenti mean ith tax bracket upper bind upperi tax rate percenti the bracket sort upper bind ie upperi1 upperi 0 bracketslengthTax calculate followsThe upper0 dollar earn tax rate percent0The upper1 upper0 dollar earn tax rate percent1the upper2 upper1 dollar earn tax rate percent2And onyou give integer income represent money earn Return money pay taxis Answers 105 actual answer accept Example 1input bracket 3507101225 income 10output 265000explanationbase income 3 dollar 1st tax bracket 4 dollar 2nd tax bracket 3 dollar 3rd tax bracketThe tax rate tax bracket 50 10 25 respectivelyIn total pay 3 50 4 10 3 25 265 taxesExample 2input bracket 10425550 income 2Output 025000explanationbase income 1 dollar 1st tax bracket 1 dollar 2nd tax bracketThe tax rate tax bracket 0 25 respectivelyIn total pay 1 0 1 25 025 taxesExample 3input bracket 250 income 0output 000000ExplanationYou income tax pay total 0 taxis Constraints1 bracketslength 1001 upperi 10000 percenti 1000 income 1000upperi sort ascend orderall value upperi uniquethe upper bind tax bracket great equal income