<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tito Owolabi</title>
    <description>The latest articles on DEV Community by Tito Owolabi (@tito_owolabi).</description>
    <link>https://dev.to/tito_owolabi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4031994%2F4ecf9e2e-068b-434e-a530-51fce1e8ba18.png</url>
      <title>DEV Community: Tito Owolabi</title>
      <link>https://dev.to/tito_owolabi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tito_owolabi"/>
    <language>en</language>
    <item>
      <title>leetCode: Longest Repeating Character Replacement</title>
      <dc:creator>Tito Owolabi</dc:creator>
      <pubDate>Thu, 16 Jul 2026 11:05:50 +0000</pubDate>
      <link>https://dev.to/tito_owolabi/leetcode-longest-repeating-character-replacement-3ebb</link>
      <guid>https://dev.to/tito_owolabi/leetcode-longest-repeating-character-replacement-3ebb</guid>
      <description>&lt;p&gt;longest repeating character replacement.&lt;/p&gt;

&lt;p&gt;why would you even want to know this? why?&lt;br&gt;
so, you could show your friends?&lt;br&gt;
is that what this is?&lt;br&gt;
oh, look, i can find the longest repeating chara-&lt;/p&gt;

&lt;p&gt;get outta here.&lt;/p&gt;

&lt;p&gt;now, that, that's said.&lt;br&gt;
how do i solve this?&lt;/p&gt;

&lt;p&gt;i've read the question and would just write how i understand it.&lt;br&gt;
i have two things.&lt;br&gt;
actually, i'm given two things and want to return one thing.&lt;/p&gt;

&lt;p&gt;what else?&lt;br&gt;
there's a string, &lt;code&gt;s&lt;/code&gt; and an integer, &lt;code&gt;k&lt;/code&gt;.&lt;br&gt;
all this just feels like beating around the bush.&lt;/p&gt;

&lt;p&gt;what am i supposed to do?&lt;br&gt;
i have a string.&lt;/p&gt;

&lt;p&gt;i can change characters in the string.&lt;br&gt;
i can change a certain amount of times.&lt;/p&gt;

&lt;p&gt;i think it's best i write down the things that are true from the question&lt;br&gt;
then put it together to know what this is really saying.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;i have a string, &lt;code&gt;s&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;i have an integer, &lt;code&gt;k&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;i want to replace characters in the string.&lt;/li&gt;
&lt;li&gt;i can only replace with uppercase English characters.&lt;/li&gt;
&lt;li&gt;i can perform up to &lt;code&gt;k&lt;/code&gt; replacements.&lt;/li&gt;
&lt;li&gt;i want to return the length of the longest substring containing the same letter i can get after performing the above operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;this is a mouthful, what's it saying really?&lt;br&gt;
i want to return the length of a substring.&lt;/p&gt;

&lt;p&gt;simply put, i want to return a number.&lt;/p&gt;

&lt;p&gt;but what is this number?&lt;br&gt;
the length of the longest substring containing the same letter i can get after performing the above operations.&lt;/p&gt;

&lt;p&gt;this is still crazy.&lt;/p&gt;

&lt;p&gt;i want to return a number.&lt;br&gt;
the number is the length of a substring.&lt;/p&gt;

&lt;p&gt;what is this substring?&lt;br&gt;
the substring is the longest substring containing the same letter i can get after performing the above operations.&lt;/p&gt;

&lt;p&gt;what operations?&lt;br&gt;
the character replacement?&lt;/p&gt;

&lt;p&gt;oh, i see.&lt;br&gt;
i want to replace characters in the original string &lt;code&gt;s&lt;/code&gt;&lt;br&gt;
in a way that it forms the longest substring of the same character?&lt;/p&gt;

&lt;p&gt;i guess. what is a substring?&lt;br&gt;
back to back characters.&lt;/p&gt;

&lt;p&gt;i see.&lt;br&gt;
so, the question is, given a string, &lt;code&gt;s&lt;/code&gt;&lt;br&gt;
where i can replace up to &lt;code&gt;k&lt;/code&gt; characters&lt;br&gt;
what's the length of the longest streak of the same character.&lt;/p&gt;

&lt;p&gt;i omitted it, but it goes without saying,&lt;br&gt;
the characters in the string &lt;code&gt;s&lt;/code&gt; are all uppercase characters.&lt;/p&gt;

&lt;p&gt;i swear, the writing on this leetcode joint drives me nuts.&lt;br&gt;
what's wrong with saying:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;there's a string that only contains uppercase characters.
you, John Cena, can replace any character you want with another uppercase character.
but you can't replace more than `k` times.

the goal is to create the longest streak of the same character.
and tell us how long that streak is.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>leetcode</category>
      <category>dsa</category>
      <category>algorithms</category>
    </item>
  </channel>
</rss>
