From 8486d22c12e29e95db0eaf9636ddd1ed5543b449 Mon Sep 17 00:00:00 2001 From: gitee-bot Date: Tue, 8 Jul 2025 14:12:26 +0000 Subject: [PATCH] Update README.md --- README.en.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 README.en.md create mode 100644 README.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..35aee9f --- /dev/null +++ b/README.en.md @@ -0,0 +1,52 @@ + + +# README.md + +## Welcome to the open source code repository on Gitee platform! + +This repository contains C++ solutions for a variety of common algorithm problems, including binary search, sliding window, two pointers, monotonic stack, enumeration, and other data structure-related topics. It is suitable for algorithm learning and as a reference for practice on platforms like LeetCode. + +## Repository Structure Description + +- **Binary search**: Problems related to binary search, such as `34.cpp`, `35.cpp`, `1146.cpp`, and `2529.cpp`. +- **Dichotomy answers**: Problems involving binary search on answers, such as `1011.cpp`, `1283.cpp`, `1482.cpp`, and others. +- **Double sequence with double pointers**: Problems involving two pointers on two sequences, such as `1023.cpp`, `2109.cpp`, `2540.cpp`, and others. +- **Enumeration from the middle**: Problems that involve enumeration from the middle, such as `1930.cpp`, `2909.cpp`, `3128.cpp`, and others. +- **Enumeration**: General enumeration problems, such as `1010.cpp`, `1512.cpp`, `2441.cpp`, and others. +- **Fixed-length sliding window**: Problems involving fixed-length sliding window techniques, such as `1052.cpp`, `1297.cpp`, `1423.cpp`, and `2269.cpp`. +- **Grid chart_BFS & Grid chart_DFS**: Breadth-First Search (BFS) and Depth-First Search (DFS) problems on 2D grids, such as `542.cpp`, `1020.cpp`, `200.cpp`, and others. +- **Grouped-cycling**: Grouped loop problems, such as `1446.cpp`, `1577.cpp`, `1759.cpp`, and others. +- **Single sequence with two pointers**: Two pointer problems on a single sequence, such as `11.cpp`, `1089.cpp`, `15.cpp`, and others. +- **Stack**: Problems related to stack algorithms, such as `1172.cpp`, `1472.cpp`, `895.cpp`, and `1441.cpp`. +- **Three pointers**: Three-pointer problems, such as `2367.cpp`, `2444.cpp`, `795.cpp`, and others. +- **Indefinitely long sliding window**: Variable-length sliding window problems, such as `3.cpp`, `76.cpp`, `438.cpp`, and others. + +## Installation and Execution + +All code is written in C++ and can be run using standard C++ compilation tools. For example: + +```bash +g++ -std=c++11 -o solution 35.cpp +./solution +``` + +## Usage + +Each `.cpp` file contains a `class Solution`, where the `public` functions correspond to solutions for LeetCode problems. You can directly copy the code into the LeetCode platform for testing. + +## Contribution + +Pull requests are welcome to improve solutions or add new problem-solving code. When submitting, please follow these guidelines: + +1. Code should use standard C++ syntax. +2. Function names within the `class Solution` should match those in the original problem. +3. Comments should preferably be in Chinese, and be clear and concise. +4. Please provide the problem number and solution idea when submitting. + +## License Agreement + +The code in this repository follows the LeetCode problem license agreement. There are no special licensing restrictions; it is intended solely for learning and research purposes. + +## Contact + +If you have any questions, please contact the repository maintainer or submit an Issue. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2029516 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ + + +# README.md + +## 欢迎使用 Gitee 平台的开源代码库! + +本仓库包含了多种常见算法问题的 C++ 解法,包括二分查找、滑动窗口、双指针、单调栈、枚举以及其它数据结构相关的题目。适用于算法学习和 LeetCode 等平台的练习参考。 + +## 仓库结构说明 + +- **Binary search**: 二分查找相关问题,如 `34.cpp`、`35.cpp`、`1146.cpp` � or `2529.cpp` 等。 +- **Dichotomy answers**: 二分答案类问题,如 `1011.cpp`、`1283.cpp`、`1482.cpp` 等。 +- **Double sequence with double pointers**: 双序列双指针问题,如 `1023.cpp`、`2109.cpp`、`2540.cpp` 等。 +- **Enumeration from the middle**: 从中间枚举的问题,如 `1930.cpp`、`2909.cpp`、`3128.cpp` 等。 +- **Enumeration**: 枚举类问题,如 `1010.cpp`、`1512.cpp`、`2441.cpp` 等。 +- **Fixed-length sliding window**: 固定长度的滑动窗口问题,如 `1052.cpp`、`1297.cpp`、`1423.cpp` � or `2269.cpp` 等。 +- **Grid chart_BFS & Grid chart_DFS**: 二维网格上的广度优先搜索(BFS)和深度优先搜索(DFS)问题,如 `542.cpp`、`1020.cpp`、`200.cpp` 等。 +- **Grouped-cycling**: 分组循环类问题,如 `1446.cpp`、`1577.cpp`、`1759.cpp` 等。 +- **Single sequence with two pointers**: 单序列双指针问题,如 `11.cpp`、`1089.cpp`、`15.cpp` 等。 +- **Stack**: 栈相关的算法问题,如 `1172.cpp`、`1472.cpp`、`895.cpp` � or `1441.cpp` 等。 +- **Three pointers**: 三指针类问题,如 `2367.cpp`、`2444.cpp`、`795.cpp` 等。 +- **Indefinitely long sliding window**: 可变长滑动窗口问题,如 `3.cpp`、`76.cpp`、`438.cpp` 等。 + +## 安装与运行 + +所有代码以 C++ 编写,使用标准的 C++ 编译工具即可运行。例如: + +```bash +g++ -std=c++11 -o solution 35.cpp +./solution +``` + +## 使用方法 + +每个 `.cpp` 文件都包含一个 `class Solution`,其中的 `public` 函数对应 LeetCode 题目的解法。您可以直接复制代码到 LeetCode 平台测试。 + +## 贡献 + +欢迎提交 PR 来完善解法或添加新的题目解答。提交时请遵循以下规范: + +1. 代码应使用标准 C++ 语法。 +2. `class Solution` 中的函数命名应与原题一致。 +3. 注释尽量使用中文,保持清晰简洁。 +4. 提交时请提供题目编号和解法思路。 + +## 授权协议 + +本仓库代码遵循 LeetCode 题目协议,无特殊协议限制,仅用于学习和研究目的。 + +## 联系方式 + +如有任何问题,请联系仓库维护者,或提交 Issues。 \ No newline at end of file -- Gitee