feat(posts): remove folds
This commit is contained in:
parent
0e6cc1de7a
commit
ed0c3b7ab2
8 changed files with 49 additions and 111 deletions
|
|
@ -157,9 +157,7 @@ private:
|
|||
size_t capacity;
|
||||
};</code></pre>
|
||||
</div>
|
||||
<div class="fold">
|
||||
<h3>optimizing the approach</h3>
|
||||
</div>
|
||||
<h3>optimizing the approach</h3>
|
||||
<div class="problem-content">
|
||||
<p>
|
||||
Rather than bear the brunt of the work finding extrema in calls to
|
||||
|
|
@ -246,9 +244,7 @@ private:
|
|||
size_t capacity;
|
||||
};</code></pre>
|
||||
</div>
|
||||
<div class="fold">
|
||||
<h3>monotonic <s>queues</s> deques</h3>
|
||||
</div>
|
||||
<h3>monotonic <s>queues</s> deques</h3>
|
||||
<div class="problem-content">
|
||||
<p>
|
||||
Thinking a bit deeper about the problem constraints, it is clear
|
||||
|
|
@ -370,7 +366,7 @@ private:
|
|||
std::deque<std::pair<double, size_t>> maxs;
|
||||
size_t capacity;
|
||||
};</code></pre>
|
||||
<div class="fold"><h3>further improvements</h3></div>
|
||||
<h3>further improvements</h3>
|
||||
<ol>
|
||||
<li>
|
||||
While the final approach is <i>theoretically</i> faster than the
|
||||
|
|
|
|||
|
|
@ -38,16 +38,14 @@
|
|||
<h1 class="post-title">Leetcode Daily</h1>
|
||||
</header>
|
||||
<article class="post-article">
|
||||
<div class="fold">
|
||||
<h2>
|
||||
<a
|
||||
target="blank"
|
||||
href="https://leetcode.com/problems/count-the-number-of-fair-pairs/"
|
||||
>count the number of fair pairs</a
|
||||
>
|
||||
— 9/13/24
|
||||
</h2>
|
||||
</div>
|
||||
<h2>
|
||||
<a
|
||||
target="blank"
|
||||
href="https://leetcode.com/problems/count-the-number-of-fair-pairs/"
|
||||
>count the number of fair pairs</a
|
||||
>
|
||||
— 9/13/24
|
||||
</h2>
|
||||
<div class="problem-content">
|
||||
<h3>problem statement</h3>
|
||||
<p>
|
||||
|
|
@ -238,16 +236,14 @@
|
|||
</p>
|
||||
<p><u>Space Complexity</u>: \(\Theta(1)\) for both.</p>
|
||||
</div>
|
||||
<div class="fold">
|
||||
<h2>
|
||||
<a
|
||||
target="blank"
|
||||
href="https://leetcode.com/problems/most-beautiful-item-for-each-query/description/"
|
||||
>most beautiful item for each query</a
|
||||
>
|
||||
— 9/12/24
|
||||
</h2>
|
||||
</div>
|
||||
<h2>
|
||||
<a
|
||||
target="blank"
|
||||
href="https://leetcode.com/problems/most-beautiful-item-for-each-query/description/"
|
||||
>most beautiful item for each query</a
|
||||
>
|
||||
— 9/12/24
|
||||
</h2>
|
||||
<div class="problem-content">
|
||||
<h3>problem statement</h3>
|
||||
<p>
|
||||
|
|
@ -373,16 +369,14 @@
|
|||
\(m\)/\(n\) respectively.
|
||||
</p>
|
||||
</div>
|
||||
<div class="fold">
|
||||
<h2>
|
||||
<a
|
||||
target="blank"
|
||||
href="https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-ii/description/"
|
||||
>shortest subarray with or at least k ii</a
|
||||
>
|
||||
— 9/11/24
|
||||
</h2>
|
||||
</div>
|
||||
<h2>
|
||||
<a
|
||||
target="blank"
|
||||
href="https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-ii/description/"
|
||||
>shortest subarray with or at least k ii</a
|
||||
>
|
||||
— 9/11/24
|
||||
</h2>
|
||||
<div class="problem-content">
|
||||
<h3>problem statement</h3>
|
||||
<p>
|
||||
|
|
@ -555,16 +549,14 @@
|
|||
OR.
|
||||
</p>
|
||||
</div>
|
||||
<div class="fold">
|
||||
<h2>
|
||||
<a
|
||||
target="blank"
|
||||
href="https://leetcode.com/problems/minimum-array-end/"
|
||||
>minimum array end</a
|
||||
>
|
||||
— 9/10/24
|
||||
</h2>
|
||||
</div>
|
||||
<h2>
|
||||
<a
|
||||
target="blank"
|
||||
href="https://leetcode.com/problems/minimum-array-end/"
|
||||
>minimum array end</a
|
||||
>
|
||||
— 9/10/24
|
||||
</h2>
|
||||
<div class="problem-content">
|
||||
<h3>problem statement</h3>
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
</header>
|
||||
<article class="post-article">
|
||||
<h2>technique overview</h2>
|
||||
<div class="fold">
|
||||
<div>
|
||||
<h3>
|
||||
<a
|
||||
target="blank"
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
return ans</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fold">
|
||||
<div>
|
||||
<h3>
|
||||
<a
|
||||
target="blank"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue