<?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>List on Yu-Cheng's Notes</title><link>https://linkingmon.github.io/blog/tags/list/</link><description>Recent content in List on Yu-Cheng's Notes</description><generator>Hugo -- 0.166.0</generator><language>en-us</language><lastBuildDate>Fri, 23 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://linkingmon.github.io/blog/tags/list/index.xml" rel="self" type="application/rss+xml"/><item><title>LC 3510 - Minimum Pair Removal to Sort Array II</title><link>https://linkingmon.github.io/blog/coding/lc-3510/</link><pubDate>Fri, 23 Jan 2026 00:00:00 +0000</pubDate><guid>https://linkingmon.github.io/blog/coding/lc-3510/</guid><description>&lt;h2 id="approach"&gt;Approach&lt;/h2&gt;
&lt;p&gt;This is a raelly interesting problem. same problem with yesterdays daily but need to come up with a much faster method.&lt;/p&gt;
&lt;p&gt;I was originally thinking that checking a vector to be sorted is &lt;code&gt;O(N)&lt;/code&gt;, and we can only done in &lt;code&gt;O(N^2)&lt;/code&gt;, and after reading one solution, I find that we only need to check the neigobers order, and count the number of ordered pairs. In this case, we can check O(1) to update the number of ordered pairs, and this can be done in &lt;code&gt;O(1)&lt;/code&gt;.&lt;/p&gt;</description></item></channel></rss>