mirror of
https://github.com/krahets/hello-algo.git
synced 2025-08-01 17:43:24 +08:00
deploy
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 3.4 KiB |
@ -1929,7 +1929,7 @@
|
||||
<a id="__codelineno-27-2" name="__codelineno-27-2" href="#__codelineno-27-2"></a><span class="kt">int</span><span class="w"> </span><span class="nf">WhileLoopII</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">n</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<a id="__codelineno-27-3" name="__codelineno-27-3" href="#__codelineno-27-3"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="p">;</span>
|
||||
<a id="__codelineno-27-4" name="__codelineno-27-4" href="#__codelineno-27-4"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="p">;</span><span class="w"> </span><span class="c1">// 初始化条件变量</span>
|
||||
<a id="__codelineno-27-5" name="__codelineno-27-5" href="#__codelineno-27-5"></a><span class="w"> </span><span class="c1">// 循环求和 1, 2, 4, 5...</span>
|
||||
<a id="__codelineno-27-5" name="__codelineno-27-5" href="#__codelineno-27-5"></a><span class="w"> </span><span class="c1">// 循环求和 1, 4, 10, ...</span>
|
||||
<a id="__codelineno-27-6" name="__codelineno-27-6" href="#__codelineno-27-6"></a><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">n</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<a id="__codelineno-27-7" name="__codelineno-27-7" href="#__codelineno-27-7"></a><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">i</span><span class="p">;</span>
|
||||
<a id="__codelineno-27-8" name="__codelineno-27-8" href="#__codelineno-27-8"></a><span class="w"> </span><span class="c1">// 更新条件变量</span>
|
||||
|
@ -1367,8 +1367,7 @@
|
||||
</div>
|
||||
|
||||
<div class="admonition quote">
|
||||
<p align="center">"Chase the wind and moon, never stopping"</p>
|
||||
<p align="center">"Beyond the plains, there are spring mountains"</p>
|
||||
<p align="center">"Knowledge increases by sharing."</p>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,162 +2,162 @@
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/array/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/linked_list/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/list/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/ram_and_cache/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/summary/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/iteration_and_recursion/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/performance_evaluation/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/space_complexity/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/summary/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/time_complexity/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_data_structure/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_data_structure/basic_data_types/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_data_structure/character_encoding/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_data_structure/classification_of_data_structure/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_data_structure/number_encoding/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_data_structure/summary/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_introduction/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_introduction/algorithms_are_everywhere/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_introduction/summary/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_introduction/what_is_dsa/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_preface/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_preface/about_the_book/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_preface/suggestions/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_preface/summary/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/deque/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/queue/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/stack/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/summary/</loc>
|
||||
<lastmod>2024-01-15</lastmod>
|
||||
<lastmod>2024-01-22</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
</urlset>
|
Binary file not shown.
@ -216,3 +216,183 @@ body {
|
||||
transform-origin: top left;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* landing page container */
|
||||
.home-div {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: var(--md-default-bg-color);
|
||||
color: var(--md-default-fg-color);
|
||||
font-size: 0.9rem;
|
||||
padding: 2em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.section-content {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-width: 70vw;
|
||||
}
|
||||
|
||||
.hero-btn {
|
||||
margin: 0 0.1em;
|
||||
padding: 0.5em 1.3em;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
/* hero image */
|
||||
.hero-image-div {
|
||||
height: min(84vh, 75vw);
|
||||
width: min(112vh, 100vw);
|
||||
margin: 0 auto;
|
||||
margin-top: -2.4rem;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
color: white;
|
||||
font-size: min(2vh, 2.5vw);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.hero-bg {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* hover on the planets */
|
||||
.hero-on-hover {
|
||||
width: auto;
|
||||
position: absolute;
|
||||
transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.hero-caption {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
}
|
||||
|
||||
a:hover .hero-on-hover {
|
||||
filter: brightness(1.2) saturate(1.1);
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
a:hover .hero-caption {
|
||||
color: var(--md-typeset-btn-color);
|
||||
}
|
||||
|
||||
/* device */
|
||||
.device-on-hover {
|
||||
width: auto;
|
||||
position: absolute;
|
||||
transition: transform 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.device-on-hover:hover {
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
/* brief intro */
|
||||
.intro-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 2em auto;
|
||||
}
|
||||
|
||||
.intro-image {
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
width: 55%;
|
||||
border-radius: 0.5em;
|
||||
box-shadow: var(--md-shadow-z2);
|
||||
}
|
||||
|
||||
.intro-text {
|
||||
flex-grow: 1; /* 允许元素填充剩余空间 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
text-align: left;
|
||||
align-items: flex-start;
|
||||
width: fit-content;
|
||||
margin: 2em;
|
||||
}
|
||||
|
||||
.intro-text > div {
|
||||
align-self: flex-start;
|
||||
width: auto;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.intro-quote {
|
||||
color: var(--md-accent-fg-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* contributors table */
|
||||
.profile-div {
|
||||
display: flex;
|
||||
flex-wrap: wrap; /* 当空间不足时换行 */
|
||||
justify-content: center; /* 居中对齐子元素 */
|
||||
max-width: 1080px; /* 或其他最大宽度 */
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
.profile-cell {
|
||||
flex: 1; /* 每个单元格均分空间 */
|
||||
flex-basis: 15%;
|
||||
margin: 1em 0.5em; /* 为了清晰间隔,可以根据需要调整 */
|
||||
text-align: center; /* 文本居中 */
|
||||
}
|
||||
|
||||
.profile-img {
|
||||
width: 5em;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
|
||||
.contrib-image {
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
/* Hide table of contents */
|
||||
@media screen and (max-width: 60em) {
|
||||
.home-div {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide navigation */
|
||||
@media screen and (max-width: 76.25em) {
|
||||
.section-content {
|
||||
max-width: 95vw;
|
||||
}
|
||||
|
||||
.intro-container {
|
||||
flex-direction: column; /* 竖向布局 */
|
||||
}
|
||||
|
||||
.intro-text {
|
||||
width: auto;
|
||||
order: 2;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.intro-image {
|
||||
width: 100%; /* 占满屏幕宽度 */
|
||||
order: 1;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.contrib-image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.profile-cell {
|
||||
flex-basis: 25%;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user