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;
|
size_t capacity;
|
||||||
};</code></pre>
|
};</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold">
|
|
||||||
<h3>optimizing the approach</h3>
|
<h3>optimizing the approach</h3>
|
||||||
</div>
|
|
||||||
<div class="problem-content">
|
<div class="problem-content">
|
||||||
<p>
|
<p>
|
||||||
Rather than bear the brunt of the work finding extrema in calls to
|
Rather than bear the brunt of the work finding extrema in calls to
|
||||||
|
|
@ -246,9 +244,7 @@ private:
|
||||||
size_t capacity;
|
size_t capacity;
|
||||||
};</code></pre>
|
};</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold">
|
|
||||||
<h3>monotonic <s>queues</s> deques</h3>
|
<h3>monotonic <s>queues</s> deques</h3>
|
||||||
</div>
|
|
||||||
<div class="problem-content">
|
<div class="problem-content">
|
||||||
<p>
|
<p>
|
||||||
Thinking a bit deeper about the problem constraints, it is clear
|
Thinking a bit deeper about the problem constraints, it is clear
|
||||||
|
|
@ -370,7 +366,7 @@ private:
|
||||||
std::deque<std::pair<double, size_t>> maxs;
|
std::deque<std::pair<double, size_t>> maxs;
|
||||||
size_t capacity;
|
size_t capacity;
|
||||||
};</code></pre>
|
};</code></pre>
|
||||||
<div class="fold"><h3>further improvements</h3></div>
|
<h3>further improvements</h3>
|
||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
While the final approach is <i>theoretically</i> faster than the
|
While the final approach is <i>theoretically</i> faster than the
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@
|
||||||
<h1 class="post-title">Leetcode Daily</h1>
|
<h1 class="post-title">Leetcode Daily</h1>
|
||||||
</header>
|
</header>
|
||||||
<article class="post-article">
|
<article class="post-article">
|
||||||
<div class="fold">
|
|
||||||
<h2>
|
<h2>
|
||||||
<a
|
<a
|
||||||
target="blank"
|
target="blank"
|
||||||
|
|
@ -47,7 +46,6 @@
|
||||||
>
|
>
|
||||||
— 9/13/24
|
— 9/13/24
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
|
||||||
<div class="problem-content">
|
<div class="problem-content">
|
||||||
<h3>problem statement</h3>
|
<h3>problem statement</h3>
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -238,7 +236,6 @@
|
||||||
</p>
|
</p>
|
||||||
<p><u>Space Complexity</u>: \(\Theta(1)\) for both.</p>
|
<p><u>Space Complexity</u>: \(\Theta(1)\) for both.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold">
|
|
||||||
<h2>
|
<h2>
|
||||||
<a
|
<a
|
||||||
target="blank"
|
target="blank"
|
||||||
|
|
@ -247,7 +244,6 @@
|
||||||
>
|
>
|
||||||
— 9/12/24
|
— 9/12/24
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
|
||||||
<div class="problem-content">
|
<div class="problem-content">
|
||||||
<h3>problem statement</h3>
|
<h3>problem statement</h3>
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -373,7 +369,6 @@
|
||||||
\(m\)/\(n\) respectively.
|
\(m\)/\(n\) respectively.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold">
|
|
||||||
<h2>
|
<h2>
|
||||||
<a
|
<a
|
||||||
target="blank"
|
target="blank"
|
||||||
|
|
@ -382,7 +377,6 @@
|
||||||
>
|
>
|
||||||
— 9/11/24
|
— 9/11/24
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
|
||||||
<div class="problem-content">
|
<div class="problem-content">
|
||||||
<h3>problem statement</h3>
|
<h3>problem statement</h3>
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -555,7 +549,6 @@
|
||||||
OR.
|
OR.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold">
|
|
||||||
<h2>
|
<h2>
|
||||||
<a
|
<a
|
||||||
target="blank"
|
target="blank"
|
||||||
|
|
@ -564,7 +557,6 @@
|
||||||
>
|
>
|
||||||
— 9/10/24
|
— 9/10/24
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
|
||||||
<div class="problem-content">
|
<div class="problem-content">
|
||||||
<h3>problem statement</h3>
|
<h3>problem statement</h3>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
</header>
|
</header>
|
||||||
<article class="post-article">
|
<article class="post-article">
|
||||||
<h2>technique overview</h2>
|
<h2>technique overview</h2>
|
||||||
<div class="fold">
|
<div>
|
||||||
<h3>
|
<h3>
|
||||||
<a
|
<a
|
||||||
target="blank"
|
target="blank"
|
||||||
|
|
@ -91,7 +91,7 @@
|
||||||
return ans</code></pre>
|
return ans</code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold">
|
<div>
|
||||||
<h3>
|
<h3>
|
||||||
<a
|
<a
|
||||||
target="blank"
|
target="blank"
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,9 @@
|
||||||
in Intermediate Macroeconomics (ECON 3020) during the Spring
|
in Intermediate Macroeconomics (ECON 3020) during the Spring
|
||||||
semester of 2024 at the University of Virginia.
|
semester of 2024 at the University of Virginia.
|
||||||
</p>
|
</p>
|
||||||
<div class="fold"><h2>solow</h2></div>
|
<h2>solow</h2>
|
||||||
<div>
|
<div>
|
||||||
<div class="fold"><h3>introduction</h3></div>
|
<h3>introduction</h3>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
The Solow Model is an economic model of production that
|
The Solow Model is an economic model of production that
|
||||||
|
|
@ -118,9 +118,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold">
|
|
||||||
<h3>solving the model</h3>
|
<h3>solving the model</h3>
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
Visualizing the model, namely output as a function of capital,
|
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})\]
|
\bar{A}^\frac{1}{1-\alpha}(\frac{\bar{s}}{\bar{d}})^\frac{\alpha}{1-\alpha})\]
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold">
|
|
||||||
<h3>analysis</h3>
|
<h3>analysis</h3>
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
Using both mathematical intuition and manipulating the
|
Using both mathematical intuition and manipulating the
|
||||||
|
|
@ -280,9 +276,9 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold"><h2>romer</h2></div>
|
<h2>romer</h2>
|
||||||
<div>
|
<div>
|
||||||
<div class="fold"><h3>introduction</h3></div>
|
<h3>introduction</h3>
|
||||||
<div>
|
<div>
|
||||||
<p>How, then, can we address these shortcomings?</p>
|
<p>How, then, can we address these shortcomings?</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -454,7 +450,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold"><h3>solving the model</h3></div>
|
<h3>solving the model</h3>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
To find the output in terms of exogenous parameters, first note
|
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}\]
|
L_{yt}=A_0(1+\bar{z}\bar{l}\bar{L})^t(1-\bar{l})\bar{L}\]
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold"><h3>analysis</h3></div>
|
<h3>analysis</h3>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
We see the Romer model exhibits long-run growth because ideas
|
We see the Romer model exhibits long-run growth because ideas
|
||||||
|
|
@ -550,9 +546,9 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold"><h2>romer-solow</h2></div>
|
<h2>romer-solow</h2>
|
||||||
<div>
|
<div>
|
||||||
<div class="fold"><h3>introduction</h3></div>
|
<h3>introduction</h3>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
While the Romer Model provides an avenue for long-run economic
|
While the Romer Model provides an avenue for long-run economic
|
||||||
|
|
@ -601,7 +597,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold"><h3>solving the model</h3></div>
|
<h3>solving the model</h3>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
Based on the the motivations for creating this model, it is more
|
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}\]
|
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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="fold"><h3>analysis</h3></div>
|
<h3>analysis</h3>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
First looking at the growth rate of output,
|
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", "##"],
|
["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 setStyle = (h) => {
|
||||||
const mdHeading = document.createElement("span");
|
const mdHeading = document.createElement("span");
|
||||||
const header = tagToHeader.has(h.tagName) ? tagToHeader.get(h.tagName) : "";
|
const header = tagToHeader.has(h.tagName) ? tagToHeader.get(h.tagName) : "";
|
||||||
|
|
@ -41,6 +19,4 @@ const setStyle = (h) => {
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
document.querySelectorAll(".post-article h2").forEach(setStyle);
|
document.querySelectorAll(".post-article h2").forEach(setStyle);
|
||||||
document.querySelectorAll(".post-article h3").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 {
|
.post {
|
||||||
font-style: italic;
|
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@ li {
|
||||||
|
|
||||||
.post-article h2 {
|
.post-article h2 {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: italic;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-article h3 {
|
.post-article h3 {
|
||||||
|
|
@ -98,14 +97,3 @@ li {
|
||||||
/* override prism.js styles */
|
/* override prism.js styles */
|
||||||
font-size: 0.85em !important;
|
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