Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2f8b6e6

Browse files
committed
docs: update foreword
1 parent fde3499 commit 2f8b6e6

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
},
2525
"homepage": "https://github.com/XPoet/js-data-structure-and-algorithm#readme",
2626
"devDependencies": {
27-
"vitepress": "^1.1.0"
27+
"vitepress": "^1.2.2"
2828
}
2929
}

‎src/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export default defineConfig({
3838
},
3939

4040
nav: [
41+
{ text: '前言', link: '/foreword', activeMatch: '/foreword' },
4142
{ text: '数据结构', link: '/data-structure/Array', activeMatch: '/data-structure/' },
4243
{ text: '算法', link: '/algorithm/sort', activeMatch: '/algorithm/' }
4344
],

‎src/docs/algorithm/classic.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ console.log(Math.min.apply(null, arr));
7373
```
7474

7575
## 求两个数的最大公约数
76+
7677
- 基本思想是采用辗转相除的方法,用大的数去除以小的那个数,
7778
- 然后再用小的数去除以的得到的余数,一直这样递归下去,直到余数为 0 时,
7879
- 最后的被除数就是两个数的最大公约数。

‎src/docs/foreword.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,22 @@
8989

9090
结论:
9191
你会发现,解决问题的办法有很多,但是好的算法对比于差的算法,效率天壤之别。
92+
93+
94+
## 学习数据结构与算法的好处
95+
96+
- **解决问题的能力**:可以教会你如何系统地思考和解决复杂问题。例如:学会如何将一个大问题分解成更小、更可管理的问题,然后逐步解决这些问题。
97+
98+
- **掌握基础知识**:许多高级的编程概念和技术(如数据库系统、操作系统、编译器等)都基于基础的数据结构和算法知识,掌握这些基础知识,可以更容易理解和学习这些高级技术。
99+
100+
- **理解计算机科学的核心**:数据结构和算法是计算机科学的核心内容。通过学习它们,可以更深入地理解计算机的工作原理和计算理论。
101+
102+
- **提高编程能力**:可以帮助你编写更高效的代码。能够选择合适的数据结构和算法,可以显著提升程序的性能和效率。
103+
104+
- **编写可维护的代码**:选择合适的数据结构不仅能提高代码的效率,还能提高代码的可读性和可维护性。良好的数据结构设计能够使代码更清晰、更易于理解和修改。
105+
106+
- **提高代码效率**:优秀的算法和数据结构设计能够显著减少程序的运行时间和内存消耗,这在处理大数据或实时系统中尤为重要。
107+
108+
- **增强面试表现**:许多大公司的面试(如 Google、微软、字节跳动、腾讯等)都会考察应聘者对数据结构和算法的掌握情况。
109+
110+
- **支持技术进步**:在科研和开发前沿技术时,数据结构和算法的创新和优化是必不可少的。无论是人工智能、机器学习,还是大数据处理,都离不开高效的算法设计。

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /