mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-22 15:53:50 +08:00
build
This commit is contained in:
@ -841,7 +841,6 @@ $$
|
||||
let mut dec_hasher = DefaultHasher::new();
|
||||
dec.to_bits().hash(&mut dec_hasher);
|
||||
let hash_dec = dec_hasher.finish();
|
||||
println!("小数 {} 的哈希值为 {}", dec, hash_dec);
|
||||
// 小数 3.14159 的哈希值为 2566941990314602357
|
||||
|
||||
let str = "Hello 算法";
|
||||
|
@ -241,6 +241,9 @@ comments: true
|
||||
```rust title="selection_sort.rs"
|
||||
/* 选择排序 */
|
||||
fn selection_sort(nums: &mut [i32]) {
|
||||
if nums.is_empty() {
|
||||
return;
|
||||
}
|
||||
let n = nums.len();
|
||||
// 外循环:未排序区间为 [i, n-1]
|
||||
for i in 0..n-1 {
|
||||
|
@ -93,14 +93,14 @@ hide:
|
||||
</div>
|
||||
|
||||
<!-- heading and buttons -->
|
||||
<div style="width: 100%; position: absolute; transform: translateX(-50%); left: 50%; bottom: min(2vh, 3vw); pointer-events: none;">
|
||||
<div style="width: 100%; position: absolute; transform: translateX(-50%); left: 50%; bottom: min(2vh, 3vw); pointer-events: none; color: #fff;">
|
||||
<img style="height: min(9vh, 12vw);"
|
||||
src="https://readme-typing-svg.demolab.com/?font=Noto+Sans+SC&weight=400&duration=3500&pause=2000&color=FFF¢er=true&vCenter=true&random=false&width=200&lines=Hello%2C+%E7%AE%97%E6%B3%95+!"
|
||||
alt="hello-algo-typing-svg" />
|
||||
<p style="color: #fff; margin-top: max(-1vh, -2vw); margin-bottom: min(2vh, 3.5vw);">
|
||||
动画图解、一键运行的数据结构与算法教程
|
||||
</p>
|
||||
<div style="pointer-events: auto;">
|
||||
<p style="margin-top: max(-1vh, -2vw); margin-bottom: min(2vh, 3.5vw);">
|
||||
动画图解、一键运行的数据结构与算法教程
|
||||
</p>
|
||||
<a href="/chapter_preface/" class="rounded-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
|
||||
@ -133,9 +133,7 @@ hide:
|
||||
<!-- Section: brief introduction -->
|
||||
<section data-md-color-scheme="slate" class="home-div">
|
||||
<div class="section-content">
|
||||
<div style="margin-top: 2em; margin-bottom: 1em;">
|
||||
<img src="index.assets/hello_algo_header.png" style="width: 100%; max-width: 39em;">
|
||||
</div>
|
||||
<img src="index.assets/hello_algo_header.png" style="width: 100%; max-width: 39em;">
|
||||
<div class="code-badge">
|
||||
<img src="https://img.shields.io/badge/Python-snow?logo=python&logoColor=3776AB">
|
||||
<img src="https://img.shields.io/badge/C%2B%2B-snow?logo=c%2B%2B&logoColor=00599C">
|
||||
|
Reference in New Issue
Block a user