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: 3753-maximum-difference-between-even-and-odd-frequency-i/README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,13 @@
1
-
<p>You are given a string <code>s</code> consisting of lowercase English letters. Your task is to find the <strong>maximum</strong> difference between the frequency of <strong>two</strong> characters in the string such that:</p>
1
+
<p>You are given a string <code>s</code> consisting of lowercase English letters.</p>
2
+
3
+
<p>Your task is to find the <strong>maximum</strong> difference <code>diff = freq(a<sub>1)</sub> - freq(a<sub>2</sub>)</code> between the frequency of characters <code>a<sub>1</sub></code> and <code>a<sub>2</sub></code> in the string such that:</p>
2
4
3
5
<ul>
4
-
<li>One of the characters has an <strong>even frequency</strong> in the string.</li>
5
-
<li>The other character has an <strong>odd frequency</strong> in the string.</li>
6
+
<li><code>a<sub>1</sub></code> has an <strong>odd frequency</strong> in the string.</li>
7
+
<li><code>a<sub>2</sub></code> has an <strong>even frequency</strong> in the string.</li>
6
8
</ul>
7
9
8
-
<p>Return the <strong>maximum</strong> difference, calculated as the frequency of the character with an <b>odd</b> frequency <strong>minus</strong> the frequency of the character with an <b>even</b> frequency.</p>
10
+
<p>Return this <strong>maximum</strong> difference.</p>
0 commit comments