From 647b496bec1a6ff1bb8a097361c67f398f773123 Mon Sep 17 00:00:00 2001 From: arthur791004 Date: Tue, 22 Jan 2019 15:22:24 +0800 Subject: [PATCH] add README.md --- .gitignore | 27 +++++++++++ README.md | 121 +++++++++++++++++++++++++++++++++++++++++++++- problems/.gitkeep | 0 3 files changed, 147 insertions(+), 1 deletion(-) create mode 100755 .gitignore create mode 100644 problems/.gitkeep diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..088ea41 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# locals +.env +/.locals diff --git a/README.md b/README.md index cd988b9..43a2c75 100644 --- a/README.md +++ b/README.md @@ -1 +1,120 @@ -# chickencode \ No newline at end of file +# Chickencode +Discuss the problem of [leetcode](https://leetcode.com/problemset/all) if you are boring + +## Rules +### How to commit +1. Create folder according the problem number under problems folder if it doesn't exists. +2. Copy your solution from leetcode under the above folder even if it's failed + - ex. `/problems/${# of problem}/${name}.js` +3. Create pull requests for your solution + +### How to create pull request +1. Try to write all of the thoughts you ever have even if it's brute force or not work +2. Try to explain why it works as much as possible +3. Try to explain your time complexity as much as possible +4. If you cannot solve the problems, you can describe what's the problem you encounter + - ex. no ideas, timeout or etc +5. all of above are nice to have, so it's okay to make the description of PR be empty :) + +## Algorithms +### Data structures +- Array +- Hash Table +- Linked List +- Stack +- Heap + - Max/Min heap +- Queue +- Priority Queue +- Tree + - Complete Binary Tree + - Binary Search Tree + - Binary Indexed Tree + - Segment Tree + +### Two Pointers (Sliding Window) +- Longest Substring Without Repeating Characters +- Longest Palindromic Substring + +### Selection +- Quick Select + - [K’th Smallest/Largest Element in Unsorted Array](https://www.geeksforgeeks.org/kth-smallestlargest-element-unsorted-array-set-2-expected-linear-time/) + - [K’th Smallest/Largest Element in Unsorted Array in Expected Linear Time](https://www.geeksforgeeks.org/kth-smallestlargest-element-unsorted-array-set-2-expected-linear-time/) +- median of median +- Linear Search +- Binary Search +- Jump Search +- Interpolation Search +- Exponential Search +- Ternary Search + +### Sorting +- Selection Sort +- Bubble Sort +- Insertion Sort +- Merge Sort +- Heap Sort +- QuickSort +- Radix Sort +- Counting Sort +- Bucket Sort +- ShellSort +- Comb Sort +- Pigeonhole Sort +- Cycle Sort + +### Divide and Conquer +- [Median of two sorted arrays](https://www.geeksforgeeks.org/median-of-two-sorted-arrays/) + +### Dynamic Programming +- Maximum Subarray +- [Longest Common Subsequence](https://www.geeksforgeeks.org/longest-common-subsequence-dp-4/) +- Matchsticks to Square + +### Mathematical + +### Bit Manipulation +- [Find the element that appears once](https://www.geeksforgeeks.org/find-the-element-that-appears-once/) +- [Add two numbers](https://www.geeksforgeeks.org/add-two-numbers-without-using-arithmetic-operators/) + +### Backtracking +- [Print all permutations of a given string](https://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-string/) +- Generate Parentheses + +### String +- Manacher’s Algorithm – Linear Time Longest Palindromic Substring + – [Part 1](https://www.geeksforgeeks.org/manachers-algorithm-linear-time-longest-palindromic-substring-part-1/) + - [Part 2](https://www.geeksforgeeks.org/manachers-algorithm-linear-time-longest-palindromic-substring-part-2/) + - [Part 3](https://www.geeksforgeeks.org/manachers-algorithm-linear-time-longest-palindromic-substring-part-3-2/) + - [Part 4](https://www.geeksforgeeks.org/manachers-algorithm-linear-time-longest-palindromic-substring-part-4/) + +### Greedy +- [Activity Selection Problem](https://www.geeksforgeeks.org/greedy-algorithms-set-1-activity-selection-problem/) + +### DFS +- Matchsticks to Square + +### BFS + +### Others +- Data +- Union Find +- Graph +- Design +- Topological Sort +- Trie +- Recursion +- Brainteaser +- Memoization +- Minimax +- Sampling +- Reservoir Sampling +- Rejection Sampling +- Map +- Geometry +- Random + +### References +- [Fundamentals of Algorithms](https://www.geeksforgeeks.org/fundamentals-of-algorithms/) +- [演算法筆記](http://www.csie.ntnu.edu.tw/~u91029/index.html) +- [Introduction · LeetCode 題解](https://siddontang.gitbooks.io/leetcode-solution/content/) diff --git a/problems/.gitkeep b/problems/.gitkeep new file mode 100644 index 0000000..e69de29