Skip to content

Commit b6effac

Browse files
authored
Merge branch 'master' into patch-6
2 parents 43397d0 + fa597b0 commit b6effac

File tree

110 files changed

+16159
-1134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+16159
-1134
lines changed

.github/check-format.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// const util = require("util");
2+
// const glob = util.promisify(require('glob'));
3+
// const fs = require("fs").promises;
4+
// const path = require('path');
5+
6+
7+
// async function main() {
8+
// var errors = [];
9+
// var directories = await glob(__dirname + '../../**/*.md');
10+
11+
// for (var filePath of directories) {
12+
// var data = await fs.readFile(filePath, 'utf8');
13+
// var filename = path.parse(filePath).base.replace(".md", "");
14+
15+
// // do check
16+
// }
17+
18+
// if (errors.length > 0) {
19+
// for (var error of errors) {
20+
// console.error(error + "\n");
21+
// }
22+
23+
// var message = `Found ${errors.length} errors! Please fix!`;
24+
// throw new Error(message);
25+
// }
26+
// }
27+
28+
// main();
29+
30+
console.log('TO BE IMPLEMENTED')

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Continuous Integration
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
markdown-lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: "16"
15+
- name: Install packages
16+
run: sudo gem install mdl
17+
- name: Get file changes
18+
id: get_file_changes
19+
uses: trilom/file-changes-action@v1.2.3
20+
with:
21+
output: " "
22+
- name: Echo file changes
23+
run: |
24+
echo Changed files: ${{ steps.get_file_changes.outputs.files }}
25+
- name: Lint markdown files
26+
run: mdl ${{ steps.get_file_changes.outputs.files}}
27+
- run: npm install
28+
- run: node .github/check-format.js

.mdl_style.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
all
2+
# 我想让图片居中,单纯的 md 似乎做不到,所以使用 raw html 来实现
3+
exclude_rule 'MD033'
4+
# 仅仅是强调,不需要用 header
5+
exclude_rule 'MD036'
6+
# 这个 rule 有 bug?
7+
exclude_rule 'MD029'

.mdlrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
style '.mdl_style.rb'

.nojekyll

Whitespace-only changes.

91/binary-search.md

Lines changed: 183 additions & 78 deletions
Large diffs are not rendered by default.

README.en.md

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# LeetCode
22

3-
[![Travis](https://img.shields.io/badge/language-C++-green.svg)]()
4-
[![Travis](https://img.shields.io/badge/language-JavaScript-yellow.svg)]()
5-
[![Travis](https://img.shields.io/badge/language-Python-red.svg)]()
6-
[![Travis](https://img.shields.io/badge/language-Java-blue.svg)]()
7-
![Total visitor](https://visitor-count-badge.herokuapp.com/total.svg?repo_id=azl397985856.leetcode.en)
8-
![Visitors in today](https://visitor-count-badge.herokuapp.com/today.svg?repo_id=azl397985856.leetcode.en)
3+
[![Travis](https://img.shields.io/badge/language-C++-green.svg)]() [![Travis](https://img.shields.io/badge/language-JavaScript-yellow.svg)]() [![Travis](https://img.shields.io/badge/language-Python-red.svg)]() [![Travis](https://img.shields.io/badge/language-Java-blue.svg)]() ![Total visitor](https://visitor-count-badge.herokuapp.com/total.svg?repo_id=azl397985856.leetcode.en) ![Visitors in today](https://visitor-count-badge.herokuapp.com/today.svg?repo_id=azl397985856.leetcode.en)
94

105
> since 2019-09-03 19:40
116
@@ -15,8 +10,7 @@
1510

1611
![leetcode.jpeg](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwf4xivj30dw0780sm.jpg)
1712

18-
This essay records the course of and my emotion to this project from initialization to 10,000 stars.
19-
[Milestone for 10,000+ stars](./thanksGiving.md)
13+
This essay records the course of and my emotion to this project from initialization to 10,000 stars. [Milestone for 10,000+ stars](./thanksGiving.md)
2014

2115
If you are interested in this project, **do not mean your star**. This project will be **supported for a long enough time** by the community. Thanks for every audience and contributor.
2216

@@ -96,12 +90,9 @@ The data structures mainly include:
9690

9791
> Here only lists some **representative problems** but not all.
9892
99-
#### Easy (Translation in Progress)
93+
#### Easy
10094

101-
- [0001.TwoSum](./problems/1.two-sum.en.md)🆕
102-
- [0053.maximum-sum-subarray](./problems/53.maximum-sum-subarray-en.md)
103-
- [0198.house-robber](./problems/198.house-robber.en.md)🆕
104-
- [0501.find-mode-in-binary-search-tree](./problems/501.Find-Mode-in-Binary-Search-Tree-en.md)🆕
95+
- [Easy Collection](https://github.com/azl397985856/leetcode/blob/master/collections/easy.en.md)
10596

10697
#### Medium (Translation in Progress)
10798

@@ -128,15 +119,31 @@ The data structures mainly include:
128119

129120
### Summary of Data Structures and Algorithm
130121

131-
- [Data Structure](./thinkings/basic-data-structure-en.md)
132-
- [Basic Algorithm](./thinkings/basic-algorithm-en.md)
122+
- [Basic data structure (overview)](./thinkings/basic-data-structure.en.md)
123+
- [I have almost finished brushing all the linked topics of Lixu, and I found these things. 。 。](./thinkings/linked-list.en.md)
124+
- [I have almost finished brushing all the tree questions of Lixu, and I found these things. 。 。](./thinkings/tree.en.md)
125+
- [堆专题(上)](./thinkings/heap.en.md) (WIP)
126+
- [I have almost finished brushing all the piles of questions, and I found these things. 。 。 (Second bullet)](./thinkings/heap-2.en.md)
127+
- [I have almost finished brushing all the two-point questions of Lixiu, and I found these things. 。 。 (Part 1)](./thinkings/binary-search-1.en.md)
128+
- [I have almost finished brushing all the two-point questions of Lixiu, and I found these things. 。 。 (Part 2)](./thinkings/binary-search-2.en.md)
129+
130+
<!-- - [基础算法](./thinkings/basic-algorithm.md) -->
131+
132+
- [Dynamic Programming](./thinkings/dynamic-programming.en.md)
133+
- [Search Problems](./thinkings/search.en.md)
133134
- [Binary Tree Traversal](./thinkings/binary-tree-traversal.en.md)
134-
- [Dynamic Programming](./thinkings/dynamic-programming-en.md)
135-
- [Huffman Encode and Run Length Encode](./thinkings/run-length-encode-and-huffman-encode-en.md)
136-
- [Bloom Filter](./thinkings/bloom-filter-en.md)
137-
- [String Problems](./thinkings/string-problems-en.md)
138-
- [Sliding Window Technique](./thinkings/slide-window.en.md)
139-
- [Trie](./thinkings/trie.en.md)
135+
- [Backtracking](./thinkings/backtrack.en.md)
136+
- [Run code and Huffman code](./thinkings/run-length-encode-and-huffman-encode.en.md)
137+
- [Bloom filter](./thinkings/bloom-filter.en.md)🖊
138+
- [Trie](./thinkings/trie.en.md)🖊
139+
- [滑动窗口(思路 + 模板)](./thinkings/slide-window.en.md) (WIP)
140+
- [Bit Operation](./thinkings/bit.en.md)
141+
- [Kojima Question](./thinkings/island.en.md)🖊
142+
- [GCD Problems](./thinkings/GCD.en.md)
143+
- [Union Find (Disjoint Set) Problem](./thinkings/union-find.en.md)
144+
- [Balanced Binary Tree](./thinkings/balanced-tree.en.md)
145+
- [Reservoir Sampling](./thinkings/reservoid-sampling.en.md)
146+
- [Monotonic stack](./thinkings/monotone-stack.en.md)
140147

141148
### Anki Flashcards
142149

0 commit comments

Comments
 (0)