Skip to content

Commit

Permalink
chore: change style
Browse files Browse the repository at this point in the history
  • Loading branch information
givedrug committed Dec 25, 2023
1 parent d818e3c commit 6520b19
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .obsidian/snippets/mycss.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*过滤目录*/
div[data-path*="index.html"],
div[data-path*="docsify.py"],
div[data-path*="LICENSE"],
Expand All @@ -6,3 +7,9 @@ div[data-path*="assets"],
div[data-path*="assets"] + div.nav-folder-children {
display: none;
}

/*引用格式*/
.markdown-preview-view blockquote {
color: #424242;
font-size: .85em;
}
4 changes: 2 additions & 2 deletions docs/01数据结构与算法/04哈希表.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ class MyHashSet {
2. 将链地址法中的链表改为树,比如java8中如果链表长度大于8,将会转为红黑树来存储
3. 扩容策略,当元素个数变大,冲突会显著增加,这时为了提升效率可以进行扩容,比如java8会将容量增加1倍

**思考**:为什么哈希函数在取整操作时,需要选择一个质数呢?

> **思考:为什么哈希函数在取整操作时,需要选择一个质数呢?**
>
> 在初等数学中有一个基本定理,任意一个大于1的自然数,要么本身就是质数,要么可以分解为几个质数之积,这种分解本身,具有唯一性。
>
> 数字的因子越多,取模后冲突的可能性就越大。而素数的因子恰好只有1和其本身,就非常适合用于解决冲突。
Expand Down
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
integrity="sha384-Qsn9KnoKISj6dI8g7p1HBlNpVx0I8p1SvlwOldgi3IorMle61nQy4zEahWYtljaz"
crossorigin="anonymous"></script>
<script src="//unpkg.com/marked@4"></script>
<link rel="stylesheet" href="src/custom.css">
</head>
<body>
<div id="app"></div>
Expand Down
3 changes: 3 additions & 0 deletions docs/src/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
blockquote {
font-size: .85em;
}

0 comments on commit 6520b19

Please sign in to comment.