> For the complete documentation index, see [llms.txt](https://algorithm-pattern.gitbook.io/algorithm-pattern-csharp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://algorithm-pattern.gitbook.io/algorithm-pattern-csharp/readme.md).

# README

> 本项目内容主要参考[算法模板 Go语言](https://github.com/greyireland/algorithm-pattern)和[算法模板 Java语言](https://github.com/chienmy/algorithm-pattern-java)，在此感谢原作者的整理与贡献

在原项目的基础上，尽量保持了原有的结构划分，并做了一点微小的工作：

* 代码改写为`C#`语言版本
* 调整内容，新增了几种算法
* 补充部分[leetcode中国站](https://leetcode.cn/)的题目链接
* 书籍链接：[GitBook](https://algorithm-pattern.gitbook.io/algorithm-pattern-csharp/)

## 核心内容

## 数据结构篇

* [链表](/algorithm-pattern-csharp/shu-ju-jie-gou-pian/linked_list.md)
* [栈和队列](/algorithm-pattern-csharp/shu-ju-jie-gou-pian/stack_queue.md)
* [二叉树](/algorithm-pattern-csharp/shu-ju-jie-gou-pian/binary_tree.md)
* [二进制](/algorithm-pattern-csharp/shu-ju-jie-gou-pian/binary_op.md)

## 基础算法篇

* [二分搜索](/algorithm-pattern-csharp/ji-chu-suan-fa-pian/binary_search.md)
* [排序算法](/algorithm-pattern-csharp/ji-chu-suan-fa-pian/sort.md)
* [动态规划](/algorithm-pattern-csharp/ji-chu-suan-fa-pian/dp.md)

## 算法思维

* [递归思维](/algorithm-pattern-csharp/suan-fa-si-wei/recursion.md)
* [滑动窗口思想](/algorithm-pattern-csharp/suan-fa-si-wei/slide_window.md)
* [二叉搜索树](https://github.com/tpxxn/algorithm-pattern-CSharp/blob/main/advanced_algorithm/binary_search_tree.md)
* [回溯法](/algorithm-pattern-csharp/suan-fa-si-wei/backtrack.md)

## 刷题建议

1. 巩固基础：先从数据结构的基础题做起，掌握常见数据结构以及对应操作的实现
2. 算法专题：推荐按类型刷题，在几天之内做完同一种类型的题目，可以迅速理解
3. 查漏补缺：对于某些不常见的特殊解法，在最后快速刷掉，务必留下印象

> #### 欢迎 star 本项目
>
> Github地址：<https://github.com/tpxxn/algorithm-pattern-CSharp>
>
> 本项目采用[知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-sa/4.0/)进行许可。

![](https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://algorithm-pattern.gitbook.io/algorithm-pattern-csharp/readme.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
