You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: solution/0400-0499/0465.Optimal Account Balancing/README_EN.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
## Description
6
6
7
-
<p>You are given an array of transactions <code>transactions</code> where <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> indicates that the person with <code>ID = from<sub>i</sub></code> gave <code>amount<sub>i</sub> $</code> to the person with <code>ID = to<sub>i</sub></code>.</p>
7
+
<p>You are given an array of transactions <code>transactions</code> where <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> indicates that the person with <code>ID = from<sub>i</sub></code> gave <code>amount<sub>i</sub> </code> to the person with <code>ID = to<sub>i</sub></code>.</p>
8
8
9
9
<p>Return <em>the minimum number of transactions required to settle the debt</em>.</p>
Copy file name to clipboardexpand all lines: solution/0800-0899/0860.Lemonade Change/README_EN.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
## Description
6
6
7
-
<p>At a lemonade stand, each lemonade costs <code>$5</code>. Customers are standing in a queue to buy from you and order one at a time (in the order specified by bills). Each customer will only buy one lemonade and pay with either a <code>$5</code>, <code>$10</code>, or <code>$20</code> bill. You must provide the correct change to each customer so that the net transaction is that the customer pays <code>$5</code>.</p>
7
+
<p>At a lemonade stand, each lemonade costs <code>5</code>. Customers are standing in a queue to buy from you and order one at a time (in the order specified by bills). Each customer will only buy one lemonade and pay with either a <code>5</code>, <code>10</code>, or <code>20</code> bill. You must provide the correct change to each customer so that the net transaction is that the customer pays <code>5</code>.</p>
8
8
9
9
<p>Note that you do not have any change in hand at first.</p>
10
10
@@ -17,9 +17,9 @@
17
17
<strong>Input:</strong> bills = [5,5,5,10,20]
18
18
<strong>Output:</strong> true
19
19
<strong>Explanation:</strong>
20
-
From the first 3 customers, we collect three $5 bills in order.
21
-
From the fourth customer, we collect a $10 bill and give back a $5.
22
-
From the fifth customer, we give a $10 bill and a $5 bill.
20
+
From the first 3 customers, we collect three 5 bills in order.
21
+
From the fourth customer, we collect a 10 bill and give back a 5.
22
+
From the fifth customer, we give a 10 bill and a 5 bill.
23
23
Since all customers got correct change, we output true.
24
24
</pre>
25
25
@@ -29,9 +29,9 @@ Since all customers got correct change, we output true.
29
29
<strong>Input:</strong> bills = [5,5,10,10,20]
30
30
<strong>Output:</strong> false
31
31
<strong>Explanation:</strong>
32
-
From the first two customers in order, we collect two $5 bills.
33
-
For the next two customers in order, we collect a $10 bill and give back a $5 bill.
34
-
For the last customer, we can not give the change of $15 back because we only have two $10 bills.
32
+
From the first two customers in order, we collect two 5 bills.
33
+
For the next two customers in order, we collect a 10 bill and give back a 5 bill.
34
+
For the last customer, we can not give the change of 15 back because we only have two 10 bills.
35
35
Since not every customer received the correct change, the answer is false.
0 commit comments