Skip to content

Commit

Permalink
Merge branch 'master' into patch-6
Browse files Browse the repository at this point in the history
  • Loading branch information
azl397985856 authored Apr 17, 2022
2 parents 43397d0 + fa597b0 commit b6effac
Show file tree
Hide file tree
Showing 110 changed files with 16,159 additions and 1,134 deletions.
30 changes: 30 additions & 0 deletions .github/check-format.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// const util = require("util");
// const glob = util.promisify(require('glob'));
// const fs = require("fs").promises;
// const path = require('path');


// async function main() {
// var errors = [];
// var directories = await glob(__dirname + '../../**/*.md');

// for (var filePath of directories) {
// var data = await fs.readFile(filePath, 'utf8');
// var filename = path.parse(filePath).base.replace(".md", "");

// // do check
// }

// if (errors.length > 0) {
// for (var error of errors) {
// console.error(error + "\n");
// }

// var message = `Found ${errors.length} errors! Please fix!`;
// throw new Error(message);
// }
// }

// main();

console.log('TO BE IMPLEMENTED')
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Continuous Integration

on:
pull_request:
branches: [master]

jobs:
markdown-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install packages
run: sudo gem install mdl
- name: Get file changes
id: get_file_changes
uses: trilom/[email protected]
with:
output: " "
- name: Echo file changes
run: |
echo Changed files: ${{ steps.get_file_changes.outputs.files }}
- name: Lint markdown files
run: mdl ${{ steps.get_file_changes.outputs.files}}
- run: npm install
- run: node .github/check-format.js
7 changes: 7 additions & 0 deletions .mdl_style.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
all
# 我想让图片居中,单纯的 md 似乎做不到,所以使用 raw html 来实现
exclude_rule 'MD033'
# 仅仅是强调,不需要用 header
exclude_rule 'MD036'
# 这个 rule 有 bug?
exclude_rule 'MD029'
1 change: 1 addition & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
style '.mdl_style.rb'
Empty file added .nojekyll
Empty file.
261 changes: 183 additions & 78 deletions 91/binary-search.md

Large diffs are not rendered by default.

49 changes: 28 additions & 21 deletions README.en.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# LeetCode

[![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)
[![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)

> since 2019-09-03 19:40
Expand All @@ -15,8 +10,7 @@

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

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)
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)

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.

Expand Down Expand Up @@ -96,12 +90,9 @@ The data structures mainly include:

> Here only lists some **representative problems** but not all.
#### Easy (Translation in Progress)
#### Easy

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

#### Medium (Translation in Progress)

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

### Summary of Data Structures and Algorithm

- [Data Structure](./thinkings/basic-data-structure-en.md)
- [Basic Algorithm](./thinkings/basic-algorithm-en.md)
- [Basic data structure (overview)](./thinkings/basic-data-structure.en.md)
- [I have almost finished brushing all the linked topics of Lixu, and I found these things. 。 。](./thinkings/linked-list.en.md)
- [I have almost finished brushing all the tree questions of Lixu, and I found these things. 。 。](./thinkings/tree.en.md)
- [堆专题(上)](./thinkings/heap.en.md) (WIP)
- [I have almost finished brushing all the piles of questions, and I found these things. 。 。 (Second bullet)](./thinkings/heap-2.en.md)
- [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)
- [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)

<!-- - [基础算法](./thinkings/basic-algorithm.md) -->

- [Dynamic Programming](./thinkings/dynamic-programming.en.md)
- [Search Problems](./thinkings/search.en.md)
- [Binary Tree Traversal](./thinkings/binary-tree-traversal.en.md)
- [Dynamic Programming](./thinkings/dynamic-programming-en.md)
- [Huffman Encode and Run Length Encode](./thinkings/run-length-encode-and-huffman-encode-en.md)
- [Bloom Filter](./thinkings/bloom-filter-en.md)
- [String Problems](./thinkings/string-problems-en.md)
- [Sliding Window Technique](./thinkings/slide-window.en.md)
- [Trie](./thinkings/trie.en.md)
- [Backtracking](./thinkings/backtrack.en.md)
- [Run code and Huffman code](./thinkings/run-length-encode-and-huffman-encode.en.md)
- [Bloom filter](./thinkings/bloom-filter.en.md)🖊
- [Trie](./thinkings/trie.en.md)🖊
- [滑动窗口(思路 + 模板)](./thinkings/slide-window.en.md) (WIP)
- [Bit Operation](./thinkings/bit.en.md)
- [Kojima Question](./thinkings/island.en.md)🖊
- [GCD Problems](./thinkings/GCD.en.md)
- [Union Find (Disjoint Set) Problem](./thinkings/union-find.en.md)
- [Balanced Binary Tree](./thinkings/balanced-tree.en.md)
- [Reservoir Sampling](./thinkings/reservoid-sampling.en.md)
- [Monotonic stack](./thinkings/monotone-stack.en.md)

### Anki Flashcards

Expand Down
Loading

0 comments on commit b6effac

Please sign in to comment.