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"
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@
|
|||
in Intermediate Macroeconomics (ECON 3020) during the Spring
|
||||
semester of 2024 at the University of Virginia.
|
||||
</p>
|
||||
<div class="fold"><h2>solow</h2></div>
|
||||
<h2>solow</h2>
|
||||
<div>
|
||||
<div class="fold"><h3>introduction</h3></div>
|
||||
<h3>introduction</h3>
|
||||
<div>
|
||||
<p>
|
||||
The Solow Model is an economic model of production that
|
||||
|
|
@ -118,9 +118,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fold">
|
||||
<h3>solving the model</h3>
|
||||
</div>
|
||||
<h3>solving the model</h3>
|
||||
<div>
|
||||
<p>
|
||||
Visualizing the model, namely output as a function of capital,
|
||||
|
|
@ -225,9 +223,7 @@
|
|||
\bar{A}^\frac{1}{1-\alpha}(\frac{\bar{s}}{\bar{d}})^\frac{\alpha}{1-\alpha})\]
|
||||
</p>
|
||||
</div>
|
||||
<div class="fold">
|
||||
<h3>analysis</h3>
|
||||
</div>
|
||||
<h3>analysis</h3>
|
||||
<div>
|
||||
<p>
|
||||
Using both mathematical intuition and manipulating the
|
||||
|
|
@ -280,9 +276,9 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fold"><h2>romer</h2></div>
|
||||
<h2>romer</h2>
|
||||
<div>
|
||||
<div class="fold"><h3>introduction</h3></div>
|
||||
<h3>introduction</h3>
|
||||
<div>
|
||||
<p>How, then, can we address these shortcomings?</p>
|
||||
<p>
|
||||
|
|
@ -454,7 +450,7 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fold"><h3>solving the model</h3></div>
|
||||
<h3>solving the model</h3>
|
||||
<div>
|
||||
<p>
|
||||
To find the output in terms of exogenous parameters, first note
|
||||
|
|
@ -474,7 +470,7 @@
|
|||
L_{yt}=A_0(1+\bar{z}\bar{l}\bar{L})^t(1-\bar{l})\bar{L}\]
|
||||
</p>
|
||||
</div>
|
||||
<div class="fold"><h3>analysis</h3></div>
|
||||
<h3>analysis</h3>
|
||||
<div>
|
||||
<p>
|
||||
We see the Romer model exhibits long-run growth because ideas
|
||||
|
|
@ -550,9 +546,9 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fold"><h2>romer-solow</h2></div>
|
||||
<h2>romer-solow</h2>
|
||||
<div>
|
||||
<div class="fold"><h3>introduction</h3></div>
|
||||
<h3>introduction</h3>
|
||||
<div>
|
||||
<p>
|
||||
While the Romer Model provides an avenue for long-run economic
|
||||
|
|
@ -601,7 +597,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fold"><h3>solving the model</h3></div>
|
||||
<h3>solving the model</h3>
|
||||
<div>
|
||||
<p>
|
||||
Based on the the motivations for creating this model, it is more
|
||||
|
|
@ -657,7 +653,7 @@
|
|||
Y_t^*={(A_0(1+\bar{z}\bar{l}\bar{L})^t})^\frac{1}{1-\alpha}(\frac{\bar{s}}{\frac{\bar{z}\bar{l}\bar{L}}{1-\alpha}+\bar{d}})^\frac{\alpha}{1-\alpha}(1-\bar{l})\bar{L}\]
|
||||
</p>
|
||||
</div>
|
||||
<div class="fold"><h3>analysis</h3></div>
|
||||
<h3>analysis</h3>
|
||||
<div>
|
||||
<p>
|
||||
First looking at the growth rate of output,
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
[ "$#" -lt 1 ] && echo "Usage: $0 <distribution-id> <path1> [path2 ...]" && exit 1
|
||||
|
||||
DISTRIBUTION_ID="$1"
|
||||
|
||||
shift
|
||||
|
||||
aws cloudfront create-invalidation --distribution-id "$DISTRIBUTION_ID" --paths "$*"
|
||||
|
|
@ -8,28 +8,6 @@ const tagToHeader = new Map([
|
|||
["H3", "##"],
|
||||
]);
|
||||
|
||||
const makeFold = (h, i) => {
|
||||
const toggle = document.createElement("span");
|
||||
toggle.style.fontStyle = "normal";
|
||||
toggle.textContent = ">";
|
||||
|
||||
// only unfold first algorithm problem
|
||||
if (urlToTopic() === "algorithms" && i === 0) toggle.textContent = "v";
|
||||
|
||||
h.parentElement.nextElementSibling.style.display =
|
||||
toggle.textContent === ">" ? "none" : "block";
|
||||
h.parentE;
|
||||
toggle.classList.add("fold-toggle");
|
||||
toggle.addEventListener("click", () => {
|
||||
const content = h.parentElement.nextElementSibling;
|
||||
toggle.textContent = toggle.textContent === ">" ? "v" : ">";
|
||||
content.style.display = toggle.textContent === ">" ? "none" : "block";
|
||||
});
|
||||
toggle.style.color = getTopicColor(urlToTopic());
|
||||
|
||||
h.prepend(toggle);
|
||||
};
|
||||
|
||||
const setStyle = (h) => {
|
||||
const mdHeading = document.createElement("span");
|
||||
const header = tagToHeader.has(h.tagName) ? tagToHeader.get(h.tagName) : "";
|
||||
|
|
@ -41,6 +19,4 @@ const setStyle = (h) => {
|
|||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.querySelectorAll(".post-article h2").forEach(setStyle);
|
||||
document.querySelectorAll(".post-article h3").forEach(setStyle);
|
||||
document.querySelectorAll(".fold h2").forEach(makeFold);
|
||||
document.querySelectorAll(".fold h3").forEach(makeFold);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ ul {
|
|||
}
|
||||
|
||||
.post {
|
||||
font-style: italic;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ li {
|
|||
|
||||
.post-article h2 {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.post-article h3 {
|
||||
|
|
@ -98,14 +97,3 @@ li {
|
|||
/* override prism.js styles */
|
||||
font-size: 0.85em !important;
|
||||
}
|
||||
|
||||
.fold {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fold-toggle {
|
||||
font-family: monospace;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
left: -25px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue