<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Hard on hungln</title><link>https://hungle45.github.io/blog/tags/hard/</link><description>Recent content in Hard on hungln</description><generator>Hugo -- 0.145.0</generator><language>en-us</language><lastBuildDate>Fri, 20 Feb 2026 11:10:06 +0700</lastBuildDate><atom:link href="https://hungle45.github.io/blog/tags/hard/index.xml" rel="self" type="application/rss+xml"/><item><title>Leetcode 761: Speical Binary String</title><link>https://hungle45.github.io/blog/on/leetcode_761_speical_binary_string/</link><pubDate>Fri, 20 Feb 2026 11:10:06 +0700</pubDate><guid>https://hungle45.github.io/blog/on/leetcode_761_speical_binary_string/</guid><description>&lt;a href="https://leetcode.com/problems/special-binary-string" target="_blank" rel="noopener noreferrer" class="leetcode-card">
&lt;div class="leetcode-card-header">
&lt;div class="leetcode-card-icon">&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
&lt;path
d="M13.483 0a1.374 1.374 0 0 0-.961.438L7.116 6.226l-3.854 4.126a5.266 5.266 0 0 0-1.209 2.104 5.35 5.35 0 0 0-.125.513 5.527 5.527 0 0 0 .062 2.362 5.83 5.83 0 0 0 .349 1.017 5.938 5.938 0 0 0 1.271 1.818l4.277 4.193.039.038c2.248 2.165 5.852 2.133 8.063-.074l2.396-2.392c.54-.54.54-1.414.003-1.955a1.378 1.378 0 0 0-1.951-.003l-2.396 2.392a3.021 3.021 0 0 1-4.205.038l-.02-.019-4.276-4.193c-.652-.64-.972-1.469-.948-2.263a2.68 2.68 0 0 1 .066-.523 2.545 2.545 0 0 1 .619-1.164L9.13 8.114c1.058-1.134 3.204-1.27 4.43-.278l3.501 2.831c.593.48 1.461.387 1.94-.207a1.384 1.384 0 0 0-.207-1.943l-3.5-2.831c-.8-.647-1.766-1.045-2.774-1.202l2.015-2.158A1.384 1.384 0 0 0 13.483 0zm-2.866 12.815a1.38 1.38 0 0 0-1.38 1.382 1.38 1.38 0 0 0 1.38 1.382H20.79a1.38 1.38 0 0 0 1.38-1.382 1.38 1.38 0 0 0-1.38-1.382z" />
&lt;/svg>&lt;/div>
&lt;div class="leetcode-card-content">&lt;span class="leetcode-card-id">#761&lt;/span>&lt;span class="leetcode-card-name">Special Binary String&lt;/span>
&lt;span class="leetcode-card-difficulty difficulty-hard">Hard&lt;/span>
&lt;span class="leetcode-card-arrow">→&lt;/span>
&lt;/div>
&lt;/div>
&lt;/a>
&lt;h3 id="approach">Approach:&lt;/h3>
&lt;h4 id="intuition">Intuition&lt;/h4>
&lt;p>A special binary string is a binary string that has equal &lt;code>1&lt;/code>s and &lt;code>0&lt;/code>s with the property that every prefix has more or equal &lt;code>1&lt;/code>s than &lt;code>0&lt;/code>s.
The goal of this problem is to find the lexicographically largest special binary string given a special binary string by swapping two consecutive substrings any number of times.&lt;/p></description></item></channel></rss>