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/1100-1199/1160.Find Words That Can Be Formed by Characters/README_EN.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ tags:
23
23
24
24
<p>You are given an array of strings <code>words</code> and a string <code>chars</code>.</p>
25
25
26
-
<p>A string is <strong>good</strong> if it can be formed by characters from <code>chars</code> (each character can only be used once).</p>
26
+
<p>A string is <strong>good</strong> if it can be formed by characters from <code>chars</code> (each character can only be used once for <strong>each</strong> word in <code>words</code>).</p>
27
27
28
28
<p>Return <em>the sum of lengths of all good strings in words</em>.</p>
(giver_id, receiver_id) is the unique key for this table.
30
-
Each row represents a record of a gift exchange between two employees, giver_id represents the employee who gives a gift, receiver_id represents the employee who receives the gift and gift_value represents the value of the gift given.
<p>Write a solution to find the <strong>total gift value</strong> and <strong>length</strong> of<strong> circular chains</strong> of Secret Santa gift exchanges:</p>
<li>Convert a single unit of type 0 into 2 units of type 1 using <code>conversions[0]</code>.</li>
52
-
<li>Convert a single unit of type 0 into 3 units of type 2 using <code>conversions[1]</code>.</li>
53
-
<li>Convert a single unit of type 0 into 8 units of type 3 using <code>conversions[0]</code>, then <code>conversions[2]</code>.</li>
54
-
<li>Convert a single unit of type 0 into 10 units of type 4 using <code>conversions[0]</code>, then <code>conversions[3]</code>.</li>
55
-
<li>Convert a single unit of type 0 into 6 units of type 5 using <code>conversions[1]</code>, then <code>conversions[4]</code>.</li>
56
-
<li>Convert a single unit of type 0 into 30 units of type 6 using <code>conversions[0]</code>, <code>conversions[3]</code>, then <code>conversions[5]</code>.</li>
57
-
<li>Convert a single unit of type 0 into 24 units of type 7 using <code>conversions[1]</code>, <code>conversions[4]</code>, then <code>conversions[6]</code>.</li>
51
+
<li>Convert a single unit of type 0 into 2 units of type 1 using <code>conversions[0]</code>.</li>
52
+
<li>Convert a single unit of type 0 into 3 units of type 2 using <code>conversions[1]</code>.</li>
53
+
<li>Convert a single unit of type 0 into 8 units of type 3 using <code>conversions[0]</code>, then <code>conversions[2]</code>.</li>
54
+
<li>Convert a single unit of type 0 into 10 units of type 4 using <code>conversions[0]</code>, then <code>conversions[3]</code>.</li>
55
+
<li>Convert a single unit of type 0 into 6 units of type 5 using <code>conversions[1]</code>, then <code>conversions[4]</code>.</li>
56
+
<li>Convert a single unit of type 0 into 30 units of type 6 using <code>conversions[0]</code>, <code>conversions[3]</code>, then <code>conversions[5]</code>.</li>
57
+
<li>Convert a single unit of type 0 into 24 units of type 7 using <code>conversions[1]</code>, <code>conversions[4]</code>, then <code>conversions[6]</code>.</li>
58
58
</ul>
59
59
</div>
60
60
61
61
<p> </p>
62
62
<p><strong>Constraints:</strong></p>
63
63
64
64
<ul>
65
-
<li><code>2 <= n <= 10<sup>5</sup></code></li>
<li>It is guaranteed that unit 0 can be converted into any other unit through a <strong>unique</strong> combination of conversions without using any conversions in the opposite direction.</li>
65
+
<li><code>2 <= n <= 10<sup>5</sup></code></li>
<li>It is guaranteed that unit 0 can be converted into any other unit through a <strong>unique</strong> combination of conversions without using any conversions in the opposite direction.</li>
0 commit comments