mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 14:12:17 +08:00
update
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<p>You are given an array of strings <code>ideas</code> that represents a list of names to be used in the process of naming a company. The process of naming a company is as follows:</p>
|
||||
|
||||
<ol>
|
||||
<li>Choose 2 <strong>distinct</strong> names from <code>ideas</code>, call them <code>idea<sub>A</sub></code> and <code>idea<sub>B</sub></code>.</li>
|
||||
<li>Swap the first letters of <code>idea<sub>A</sub></code> and <code>idea<sub>B</sub></code> with each other.</li>
|
||||
<li>If <strong>both</strong> of the new names are not found in the original <code>ideas</code>, then the name <code>idea<sub>A</sub> idea<sub>B</sub></code> (the <strong>concatenation</strong> of <code>idea<sub>A</sub></code> and <code>idea<sub>B</sub></code>, separated by a space) is a valid company name.</li>
|
||||
<li>Otherwise, it is not a valid name.</li>
|
||||
</ol>
|
||||
|
||||
<p>Return <em>the number of <strong>distinct</strong> valid names for the company</em>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> ideas = ["coffee","donuts","time","toffee"]
|
||||
<strong>Output:</strong> 6
|
||||
<strong>Explanation:</strong> The following selections are valid:
|
||||
- ("coffee", "donuts"): The company name created is "doffee conuts".
|
||||
- ("donuts", "coffee"): The company name created is "conuts doffee".
|
||||
- ("donuts", "time"): The company name created is "tonuts dime".
|
||||
- ("donuts", "toffee"): The company name created is "tonuts doffee".
|
||||
- ("time", "donuts"): The company name created is "dime tonuts".
|
||||
- ("toffee", "donuts"): The company name created is "doffee tonuts".
|
||||
Therefore, there are a total of 6 distinct company names.
|
||||
|
||||
The following are some examples of invalid selections:
|
||||
- ("coffee", "time"): The name "toffee" formed after swapping already exists in the original array.
|
||||
- ("time", "toffee"): Both names are still the same after swapping and exist in the original array.
|
||||
- ("coffee", "toffee"): Both names formed after swapping already exist in the original array.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> ideas = ["lack","back"]
|
||||
<strong>Output:</strong> 0
|
||||
<strong>Explanation:</strong> There are no valid selections. Therefore, 0 is returned.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>2 <= ideas.length <= 5 * 10<sup>4</sup></code></li>
|
||||
<li><code>1 <= ideas[i].length <= 10</code></li>
|
||||
<li><code>ideas[i]</code> consists of lowercase English letters.</li>
|
||||
<li>All the strings in <code>ideas</code> are <strong>unique</strong>.</li>
|
||||
</ul>
|
@@ -0,0 +1,40 @@
|
||||
<p>You are given an integer array <code>cookies</code>, where <code>cookies[i]</code> denotes the number of cookies in the <code>i<sup>th</sup></code> bag. You are also given an integer <code>k</code> that denotes the number of children to distribute <strong>all</strong> the bags of cookies to. All the cookies in the same bag must go to the same child and cannot be split up.</p>
|
||||
|
||||
<p>The <strong>unfairness</strong> of a distribution is defined as the <strong>maximum</strong> <strong>total</strong> cookies obtained by a single child in the distribution.</p>
|
||||
|
||||
<p>Return <em>the <strong>minimum</strong> unfairness of all distributions</em>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> cookies = [8,15,10,20,8], k = 2
|
||||
<strong>Output:</strong> 31
|
||||
<strong>Explanation:</strong> One optimal distribution is [8,15,8] and [10,20]
|
||||
- The 1<sup>st</sup> child receives [8,15,8] which has a total of 8 + 15 + 8 = 31 cookies.
|
||||
- The 2<sup>nd</sup> child receives [10,20] which has a total of 10 + 20 = 30 cookies.
|
||||
The unfairness of the distribution is max(31,30) = 31.
|
||||
It can be shown that there is no distribution with an unfairness less than 31.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> cookies = [6,1,3,2,2,4,1,2], k = 3
|
||||
<strong>Output:</strong> 7
|
||||
<strong>Explanation:</strong> One optimal distribution is [6,1], [3,2,2], and [4,1,2]
|
||||
- The 1<sup>st</sup> child receives [6,1] which has a total of 6 + 1 = 7 cookies.
|
||||
- The 2<sup>nd</sup> child receives [3,2,2] which has a total of 3 + 2 + 2 = 7 cookies.
|
||||
- The 3<sup>rd</sup> child receives [4,1,2] which has a total of 4 + 1 + 2 = 7 cookies.
|
||||
The unfairness of the distribution is max(7,7,7) = 7.
|
||||
It can be shown that there is no distribution with an unfairness less than 7.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>2 <= cookies.length <= 8</code></li>
|
||||
<li><code>1 <= cookies[i] <= 10<sup>5</sup></code></li>
|
||||
<li><code>2 <= k <= cookies.length</code></li>
|
||||
</ul>
|
@@ -0,0 +1,41 @@
|
||||
<p>You are given two positive integer arrays <code>spells</code> and <code>potions</code>, of length <code>n</code> and <code>m</code> respectively, where <code>spells[i]</code> represents the strength of the <code>i<sup>th</sup></code> spell and <code>potions[j]</code> represents the strength of the <code>j<sup>th</sup></code> potion.</p>
|
||||
|
||||
<p>You are also given an integer <code>success</code>. A spell and potion pair is considered <strong>successful</strong> if the <strong>product</strong> of their strengths is <strong>at least</strong> <code>success</code>.</p>
|
||||
|
||||
<p>Return <em>an integer array </em><code>pairs</code><em> of length </em><code>n</code><em> where </em><code>pairs[i]</code><em> is the number of <strong>potions</strong> that will form a successful pair with the </em><code>i<sup>th</sup></code><em> spell.</em></p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> spells = [5,1,3], potions = [1,2,3,4,5], success = 7
|
||||
<strong>Output:</strong> [4,0,3]
|
||||
<strong>Explanation:</strong>
|
||||
- 0<sup>th</sup> spell: 5 * [1,2,3,4,5] = [5,<u><strong>10</strong></u>,<u><strong>15</strong></u>,<u><strong>20</strong></u>,<u><strong>25</strong></u>]. 4 pairs are successful.
|
||||
- 1<sup>st</sup> spell: 1 * [1,2,3,4,5] = [1,2,3,4,5]. 0 pairs are successful.
|
||||
- 2<sup>nd</sup> spell: 3 * [1,2,3,4,5] = [3,6,<u><strong>9</strong></u>,<u><strong>12</strong></u>,<u><strong>15</strong></u>]. 3 pairs are successful.
|
||||
Thus, [4,0,3] is returned.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> spells = [3,1,2], potions = [8,5,8], success = 16
|
||||
<strong>Output:</strong> [2,0,2]
|
||||
<strong>Explanation:</strong>
|
||||
- 0<sup>th</sup> spell: 3 * [8,5,8] = [<u><strong>24</strong></u>,15,<u><strong>24</strong></u>]. 2 pairs are successful.
|
||||
- 1<sup>st</sup> spell: 1 * [8,5,8] = [8,5,8]. 0 pairs are successful.
|
||||
- 2<sup>nd</sup> spell: 2 * [8,5,8] = [<strong><u>16</u></strong>,10,<u><strong>16</strong></u>]. 2 pairs are successful.
|
||||
Thus, [2,0,2] is returned.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>n == spells.length</code></li>
|
||||
<li><code>m == potions.length</code></li>
|
||||
<li><code>1 <= n, m <= 10<sup>5</sup></code></li>
|
||||
<li><code>1 <= spells[i], potions[i] <= 10<sup>5</sup></code></li>
|
||||
<li><code>1 <= success <= 10<sup>10</sup></code></li>
|
||||
</ul>
|
@@ -0,0 +1,44 @@
|
||||
<p>A password is said to be <strong>strong</strong> if it satisfies all the following criteria:</p>
|
||||
|
||||
<ul>
|
||||
<li>It has at least <code>8</code> characters.</li>
|
||||
<li>It contains at least <strong>one lowercase</strong> letter.</li>
|
||||
<li>It contains at least <strong>one uppercase</strong> letter.</li>
|
||||
<li>It contains at least <strong>one digit</strong>.</li>
|
||||
<li>It contains at least <strong>one special character</strong>. The special characters are the characters in the following string: <code>"!@#$%^&*()-+"</code>.</li>
|
||||
<li>It does <strong>not</strong> contain <code>2</code> of the same character in adjacent positions (i.e., <code>"aab"</code> violates this condition, but <code>"aba"</code> does not).</li>
|
||||
</ul>
|
||||
|
||||
<p>Given a string <code>password</code>, return <code>true</code><em> if it is a <strong>strong</strong> password</em>. Otherwise, return <code>false</code>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> password = "IloveLe3tcode!"
|
||||
<strong>Output:</strong> true
|
||||
<strong>Explanation:</strong> The password meets all the requirements. Therefore, we return true.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> password = "Me+You--IsMyDream"
|
||||
<strong>Output:</strong> false
|
||||
<strong>Explanation:</strong> The password does not contain a digit and also contains 2 of the same character in adjacent positions. Therefore, we return false.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> password = "1aB!"
|
||||
<strong>Output:</strong> false
|
||||
<strong>Explanation:</strong> The password does not meet the length requirement. Therefore, we return false.</pre>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= password.length <= 100</code></li>
|
||||
<li><code>password</code> consists of letters, digits, and special characters: <code>"!@#$%^&*()-+"</code>.</li>
|
||||
</ul>
|
@@ -0,0 +1,45 @@
|
||||
<p>You are given two strings <code>s</code> and <code>sub</code>. You are also given a 2D character array <code>mappings</code> where <code>mappings[i] = [old<sub>i</sub>, new<sub>i</sub>]</code> indicates that you may <strong>replace</strong> any number of <code>old<sub>i</sub></code> characters of <code>sub</code> with <code>new<sub>i</sub></code>. Each character in <code>sub</code> <strong>cannot</strong> be replaced more than once.</p>
|
||||
|
||||
<p>Return <code>true</code><em> if it is possible to make </em><code>sub</code><em> a substring of </em><code>s</code><em> by replacing zero or more characters according to </em><code>mappings</code>. Otherwise, return <code>false</code>.</p>
|
||||
|
||||
<p>A <strong>substring</strong> is a contiguous non-empty sequence of characters within a string.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s = "fool3e7bar", sub = "leet", mappings = [["e","3"],["t","7"],["t","8"]]
|
||||
<strong>Output:</strong> true
|
||||
<strong>Explanation:</strong> Replace the first 'e' in sub with '3' and 't' in sub with '7'.
|
||||
Now sub = "l3e7" is a substring of s, so we return true.</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s = "fooleetbar", sub = "f00l", mappings = [["o","0"]]
|
||||
<strong>Output:</strong> false
|
||||
<strong>Explanation:</strong> The string "f00l" is not a substring of s and no replacements can be made.
|
||||
Note that we cannot replace '0' with 'o'.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> s = "Fool33tbaR", sub = "leetd", mappings = [["e","3"],["t","7"],["t","8"],["d","b"],["p","b"]]
|
||||
<strong>Output:</strong> true
|
||||
<strong>Explanation:</strong> Replace the first and second 'e' in sub with '3' and 'd' in sub with 'b'.
|
||||
Now sub = "l33tb" is a substring of s, so we return true.
|
||||
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= sub.length <= s.length <= 5000</code></li>
|
||||
<li><code>0 <= mappings.length <= 1000</code></li>
|
||||
<li><code>mappings[i].length == 2</code></li>
|
||||
<li><code>old<sub>i</sub> != new<sub>i</sub></code></li>
|
||||
<li><code>s</code> and <code>sub</code> consist of uppercase and lowercase English letters and digits.</li>
|
||||
<li><code>old<sub>i</sub></code> and <code>new<sub>i</sub></code> are either uppercase or lowercase English letters or digits.</li>
|
||||
</ul>
|
@@ -0,0 +1,45 @@
|
||||
<p>The <strong>score</strong> of an array is defined as the <strong>product</strong> of its sum and its length.</p>
|
||||
|
||||
<ul>
|
||||
<li>For example, the score of <code>[1, 2, 3, 4, 5]</code> is <code>(1 + 2 + 3 + 4 + 5) * 5 = 75</code>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Given a positive integer array <code>nums</code> and an integer <code>k</code>, return <em>the <strong>number of non-empty subarrays</strong> of</em> <code>nums</code> <em>whose score is <strong>strictly less</strong> than</em> <code>k</code>.</p>
|
||||
|
||||
<p>A <strong>subarray</strong> is a contiguous sequence of elements within an array.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> nums = [2,1,4,3,5], k = 10
|
||||
<strong>Output:</strong> 6
|
||||
<strong>Explanation:</strong>
|
||||
The 6 subarrays having scores less than 10 are:
|
||||
- [2] with score 2 * 1 = 2.
|
||||
- [1] with score 1 * 1 = 1.
|
||||
- [4] with score 4 * 1 = 4.
|
||||
- [3] with score 3 * 1 = 3.
|
||||
- [5] with score 5 * 1 = 5.
|
||||
- [2,1] with score (2 + 1) * 2 = 6.
|
||||
Note that subarrays such as [1,4] and [4,3,5] are not considered because their scores are 10 and 36 respectively, while we need scores strictly less than 10.</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> nums = [1,1,1], k = 5
|
||||
<strong>Output:</strong> 5
|
||||
<strong>Explanation:</strong>
|
||||
Every subarray except [1,1,1] has a score less than 5.
|
||||
[1,1,1] has a score (1 + 1 + 1) * 3 = 9, which is greater than 5.
|
||||
Thus, there are 5 subarrays having scores less than 5.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= nums.length <= 10<sup>5</sup></code></li>
|
||||
<li><code>1 <= nums[i] <= 10<sup>5</sup></code></li>
|
||||
<li><code>1 <= k <= 10<sup>15</sup></code></li>
|
||||
</ul>
|
@@ -0,0 +1,42 @@
|
||||
<p>You are given a <strong>0-indexed</strong> <code>m x n</code> integer matrix <code>grid</code> consisting of <strong>distinct</strong> integers from <code>0</code> to <code>m * n - 1</code>. You can move in this matrix from a cell to any other cell in the <strong>next</strong> row. That is, if you are in cell <code>(x, y)</code> such that <code>x < m - 1</code>, you can move to any of the cells <code>(x + 1, 0)</code>, <code>(x + 1, 1)</code>, ..., <code>(x + 1, n - 1)</code>. <strong>Note</strong> that it is not possible to move from cells in the last row.</p>
|
||||
|
||||
<p>Each possible move has a cost given by a <strong>0-indexed</strong> 2D array <code>moveCost</code> of size <code>(m * n) x n</code>, where <code>moveCost[i][j]</code> is the cost of moving from a cell with value <code>i</code> to a cell in column <code>j</code> of the next row. The cost of moving from cells in the last row of <code>grid</code> can be ignored.</p>
|
||||
|
||||
<p>The cost of a path in <code>grid</code> is the <strong>sum</strong> of all values of cells visited plus the <strong>sum</strong> of costs of all the moves made. Return <em>the <strong>minimum</strong> cost of a path that starts from any cell in the <strong>first</strong> row and ends at any cell in the <strong>last</strong> row.</em></p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<img alt="" src="https://assets.leetcode.com/uploads/2022/04/28/griddrawio-2.png" style="width: 301px; height: 281px;" />
|
||||
<pre>
|
||||
<strong>Input:</strong> grid = [[5,3],[4,0],[2,1]], moveCost = [[9,8],[1,5],[10,12],[18,6],[2,4],[14,3]]
|
||||
<strong>Output:</strong> 17
|
||||
<strong>Explanation: </strong>The path with the minimum possible cost is the path 5 -> 0 -> 1.
|
||||
- The sum of the values of cells visited is 5 + 0 + 1 = 6.
|
||||
- The cost of moving from 5 to 0 is 3.
|
||||
- The cost of moving from 0 to 1 is 8.
|
||||
So the total cost of the path is 6 + 3 + 8 = 17.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> grid = [[5,1,2],[4,0,3]], moveCost = [[12,10,15],[20,23,8],[21,7,1],[8,1,13],[9,10,25],[5,3,2]]
|
||||
<strong>Output:</strong> 6
|
||||
<strong>Explanation:</strong> The path with the minimum possible cost is the path 2 -> 3.
|
||||
- The sum of the values of cells visited is 2 + 3 = 5.
|
||||
- The cost of moving from 2 to 3 is 1.
|
||||
So the total cost of this path is 5 + 1 = 6.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>m == grid.length</code></li>
|
||||
<li><code>n == grid[i].length</code></li>
|
||||
<li><code>2 <= m, n <= 50</code></li>
|
||||
<li><code>grid</code> consists of distinct integers from <code>0</code> to <code>m * n - 1</code>.</li>
|
||||
<li><code>moveCost.length == m * n</code></li>
|
||||
<li><code>moveCost[i].length == n</code></li>
|
||||
<li><code>1 <= moveCost[i][j] <= 100</code></li>
|
||||
</ul>
|
@@ -0,0 +1,57 @@
|
||||
<p>You are given a <strong>0-indexed</strong> 2D integer array <code>brackets</code> where <code>brackets[i] = [upper<sub>i</sub>, percent<sub>i</sub>]</code> means that the <code>i<sup>th</sup></code> tax bracket has an upper bound of <code>upper<sub>i</sub></code> and is taxed at a rate of <code>percent<sub>i</sub></code>. The brackets are <strong>sorted</strong> by upper bound (i.e. <code>upper<sub>i-1</sub> < upper<sub>i</sub></code> for <code>0 < i < brackets.length</code>).</p>
|
||||
|
||||
<p>Tax is calculated as follows:</p>
|
||||
|
||||
<ul>
|
||||
<li>The first <code>upper<sub>0</sub></code> dollars earned are taxed at a rate of <code>percent<sub>0</sub></code>.</li>
|
||||
<li>The next <code>upper<sub>1</sub> - upper<sub>0</sub></code> dollars earned are taxed at a rate of <code>percent<sub>1</sub></code>.</li>
|
||||
<li>The next <code>upper<sub>2</sub> - upper<sub>1</sub></code> dollars earned are taxed at a rate of <code>percent<sub>2</sub></code>.</li>
|
||||
<li>And so on.</li>
|
||||
</ul>
|
||||
|
||||
<p>You are given an integer <code>income</code> representing the amount of money you earned. Return <em>the amount of money that you have to pay in taxes.</em> Answers within <code>10<sup>-5</sup></code> of the actual answer will be accepted.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> brackets = [[3,50],[7,10],[12,25]], income = 10
|
||||
<strong>Output:</strong> 2.65000
|
||||
<strong>Explanation:</strong>
|
||||
Based on your income, you have 3 dollars in the 1<sup>st</sup> tax bracket, 4 dollars in the 2<sup>nd</sup> tax bracket, and 3 dollars in the 3<sup>rd</sup> tax bracket.
|
||||
The tax rate for the three tax brackets is 50%, 10%, and 25%, respectively.
|
||||
In total, you pay $3 * 50% + $4 * 10% + $3 * 25% = $2.65 in taxes.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> brackets = [[1,0],[4,25],[5,50]], income = 2
|
||||
<strong>Output:</strong> 0.25000
|
||||
<strong>Explanation:</strong>
|
||||
Based on your income, you have 1 dollar in the 1<sup>st</sup> tax bracket and 1 dollar in the 2<sup>nd</sup> tax bracket.
|
||||
The tax rate for the two tax brackets is 0% and 25%, respectively.
|
||||
In total, you pay $1 * 0% + $1 * 25% = $0.25 in taxes.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> brackets = [[2,50]], income = 0
|
||||
<strong>Output:</strong> 0.00000
|
||||
<strong>Explanation:</strong>
|
||||
You have no income to tax, so you have to pay a total of $0 in taxes.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= brackets.length <= 100</code></li>
|
||||
<li><code>1 <= upper<sub>i</sub> <= 1000</code></li>
|
||||
<li><code>0 <= percent<sub>i</sub> <= 100</code></li>
|
||||
<li><code>0 <= income <= 1000</code></li>
|
||||
<li><code>upper<sub>i</sub></code> is sorted in ascending order.</li>
|
||||
<li>All the values of <code>upper<sub>i</sub></code> are <strong>unique</strong>.</li>
|
||||
<li>The upper bound of the last tax bracket is greater than or equal to <code>income</code>.</li>
|
||||
</ul>
|
Reference in New Issue
Block a user