Skip to content

Commit f383a8a

Browse files
committed
Add index of algorithm
1 parent 7037468 commit f383a8a

27 files changed

+525
-342
lines changed

.gitignore

+79
Original file line numberDiff line numberDiff line change
@@ -905,3 +905,82 @@ Carthage/Build
905905
Pods/
906906

907907
# End of https://www.gitignore.io/api/c,go,c++,java,ruby,swift,csharp,python
908+
909+
docs/_site/*
910+
docs/_theme_packages/*
911+
docs/build/*
912+
913+
Thumbs.db
914+
.DS_Store
915+
916+
!.gitkeep
917+
918+
.rbenv-version
919+
.rvmrc
920+
921+
*.swp
922+
923+
924+
# Created by https://www.gitignore.io/api/intellij+all
925+
926+
### Intellij+all ###
927+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
928+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
929+
930+
# User-specific stuff:
931+
.idea/**/workspace.xml
932+
.idea/**/tasks.xml
933+
.idea/dictionaries
934+
935+
# Sensitive or high-churn files:
936+
.idea/**/dataSources/
937+
.idea/**/dataSources.ids
938+
.idea/**/dataSources.xml
939+
.idea/**/dataSources.local.xml
940+
.idea/**/sqlDataSources.xml
941+
.idea/**/dynamic.xml
942+
.idea/**/uiDesigner.xml
943+
944+
# Gradle:
945+
.idea/**/gradle.xml
946+
.idea/**/libraries
947+
948+
# CMake
949+
cmake-build-debug/
950+
951+
# Mongo Explorer plugin:
952+
.idea/**/mongoSettings.xml
953+
954+
## File-based project format:
955+
*.iws
956+
957+
## Plugin-specific files:
958+
959+
# IntelliJ
960+
/out/
961+
962+
# mpeltonen/sbt-idea plugin
963+
.idea_modules/
964+
965+
# JIRA plugin
966+
atlassian-ide-plugin.xml
967+
968+
# Cursive Clojure plugin
969+
.idea/replstate.xml
970+
971+
# Ruby plugin and RubyMine
972+
/.rakeTasks
973+
974+
# Crashlytics plugin (for Android Studio and IntelliJ)
975+
com_crashlytics_export_strings.xml
976+
crashlytics.properties
977+
crashlytics-build.properties
978+
fabric.properties
979+
980+
### Intellij+all Patch ###
981+
# Ignores the whole idea folder
982+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
983+
984+
.idea/
985+
986+
# End of https://www.gitignore.io/api/intellij+all

README.md

+5-318
Large diffs are not rendered by default.

docs/_config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ port: 11111
33
exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md"]
44
auto: true
55
markdown: kramdown
6-
#highlighter: rouge
7-
pygments: true
6+
highlighter: rouge
7+
# pygments: true
88
# 分页配置,每页最多显示几篇文章
99
paginate: 4
1010

docs/_includes/site/posts_of_category

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% if post.title != null %}
55
<li>
66
<span class="category-archive">
7-
<i class="fa fa-{{ post.icon }} fa-border"></i> <a href="{{ BASE_PATH | relative_url}}{{ post.url }}" class="post-url">{{ post.title }}</a>
7+
<i class="fa fa-{{ post.icon }} fa-border"></i> <a href="{{ BASE_PATH }}{{ post.url | relative_url}}" class="post-url">{{ post.title }}</a>
88
</span>
99
<span class="post-right-info pull-right">
1010
{{ post.date | date: " %Y-%m-%d " }}

docs/_includes/site/posts_table

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<tr>
44
<td class="post-date">{{ post.date | date: "%Y-%m-%d" }}</td>
55
<td class="post-url">
6-
<a href="{{ BASE_PATH | relative_url}}{{ post.url }}">{{ post.title }}</a>
6+
<a href="{{ BASE_PATH }}{{ post.url | relative_url}}">{{ post.title }}</a>
77
</td>
88
<td class="post-tags">{{ post.tags | join:', ' }}</td>
99
</tr>

docs/_includes/site/timeline

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<li>
1616
<span class="category-archive">
17-
<i class="fa fa-{{ post.icon }} fa-border"></i> <a href="{{ BASE_PATH | relative_url}}{{ post.url }}" class="post-url">{{ post.title }}</a>
17+
<i class="fa fa-{{ post.icon }} fa-border"></i> <a href="{{ BASE_PATH }}{{ post.url | relative_url}}" class="post-url">{{ post.title }}</a>
1818
</span>
1919
<span class="post-right-info pull-right">
2020
{{ post.categories | join:' / ' }}

docs/_includes/themes/twitter/default.html

+5
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,10 @@
8686
</div>
8787

8888
{% include site/analytics %}
89+
90+
<a href="http://github.com/dunso/algorithm" target="_blank"
91+
class="github-corner">
92+
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:#337ab7; color:#fff; position: absolute; top: 0; border: 0; right: 0;"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg>
93+
</a>
8994
</body>
9095
</html>

docs/_includes/themes/twitter/index.html

-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
<div class="row typo">
22
<div class="col-md-2">
3-
<ul class="nav nav-tabs nav-stacked dispear" id="support">
4-
<li><a href="#" onclick="toggleSupport();return false;"><i class="fa fa-star-o"></i> 技术支持</a></li>
5-
<li><a data-toggle="tooltip" title data-original-title="为 Twitter Bootstrap 设计的图标字体" href="http://fontawesome.io" target="_blank"><i class="fa fa-star-o"></i> Font-Awesome</a></li>
6-
<li><a data-toggle="tooltip" title data-original-title="github提供的免费静态页面服务,使用git进行发布和管理" href="http://pages.github.com" target="_blank"><i class="fa fa-star-o"></i> Github Pages</a></li>
7-
<li><a data-toggle="tooltip" title data-original-title="静态页面生成工具" href="http://jekyllrb.com" target="_blank"><i class="fa fa-star-o"></i> Jekyll</a></li>
8-
<li><a data-toggle="tooltip" title data-original-title="博客页面模板" href="http://jekyllbootstrap.com" target="_blank"><i class="fa fa-star-o"></i> Jekyll-Bootstrap</a></li>
9-
<li><a data-toggle="tooltip" title data-original-title="Javascript框架" href="http://jquery.com" target="_blank"><i class="fa fa-star-o"></i> JQuery</a></li>
10-
<li><a data-toggle="tooltip" title data-original-title="基于JQuery的表格插件" href="http://www.datatables.net/" target="_blank"><i class="fa fa-star-o"></i> DataTables</a></li>
11-
<li><a data-toggle="tooltip" title data-original-title="Twitter提供的前端框架" href="http://twitter.github.io/bootstrap" target="_blank"><i class="fa fa-star-o"></i> Twitter Bootstrap</a></li>
12-
<li><a data-toggle="tooltip" title data-original-title="排版样式表" href="http://typo.sofish.de" target="_blank"><i class="fa fa-star-o"></i> Typo.css</a></li>
13-
<li><a data-toggle="tooltip" title data-original-title="开发工具" href="http://www.vim.org" target="_blank"><i class="fa fa-star-o"></i> Vim</a></li>
14-
</ul>
153
</div>
164
<div class="col-md-8">
175
{{ content }}

docs/_posts/2017-11-29-Array.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ icon: file-alt
1212

1313
|Id | Title | Solution | Time | Runtime | Space | Difficulty | Catagory|
1414
------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------
15-
| <a href="https://leetcode.com/problems/two-sum" target="_blank">0001</a> |Two Sum | [C](https://e.srl/leetcode-1/) | no | 0ms | O(n) | Easy |Array|
16-
| <a href="https://leetcode.com/problems/add-two-numbers" target="_blank">0002</a> |Add Two Numbers | [C](https://e.srl/leetcode-2/) | no |32ms | O(1) | Medium |Array|
17-
| <a href="https://leetcode.com/problems/longest-substring-without-repeating-characters" target="_blank">0003</a> |Longest Substring Without Repeating Characters | [C](https://e.srl/leetcode-3/) | no |18ms| O(n) | Medium |Array|
18-
| <a href="https://leetcode.com/problems/longest-palindromic-substring" target="_blank">0005</a> |Longest Palindromic Substring | [C](https://e.srl/leetcode-5/) | no |9ms| O(1) | Medium |Array|
19-
| <a href="https://leetcode.com/problems/zigzag-conversion" target="_blank">0006</a> |ZigZag Conversion | [C#](https://e.srl/leetcode-6/) | no| | O(n) | Medium |Array|
15+
| <a href="https://leetcode.com/problems/two-sum" target="_blank">0001</a> |Two Sum | [C](https://e.srl/leetcode-1/) | - | 0ms | O(n) | Easy |Array|
16+
| <a href="https://leetcode.com/problems/add-two-numbers" target="_blank">0002</a> |Add Two Numbers | [C](https://e.srl/leetcode-2/) | - |32ms | O(1) | Medium |Array|
17+
| <a href="https://leetcode.com/problems/longest-substring-without-repeating-characters" target="_blank">0003</a> |Longest Substring Without Repeating Characters | [C](https://e.srl/leetcode-3/) | - |18ms| O(n) | Medium |Array|
18+
| <a href="https://leetcode.com/problems/longest-palindromic-substring" target="_blank">0005</a> |Longest Palindromic Substring | [C](https://e.srl/leetcode-5/) | - |9ms| O(1) | Medium |Array|
19+
| <a href="https://leetcode.com/problems/zigzag-conversion" target="_blank">0006</a> |ZigZag Conversion | [C#](https://e.srl/leetcode-6/) | -| | O(n) | Medium |Array|
2020
| <a href="https://leetcode.com/problems/longest-common-prefix" target="_blank">0014</a> |Longest Common Prefix | [C](https://e.srl/leetcode-14/) | O(n\*n) |3ms| O(n) | Easy |Array|
2121
| <a href="https://leetcode.com/problems/first-missing-positive" target="_blank">0041</a> |First Missing Positive | [C](https://e.srl/leetcode-41/) | O(n) |3ms| O(1) | Hard |Array|
2222
| <a href="https://leetcode.com/problems/trapping-rain-water" target="_blank">0042</a> |Trapping Rain Water | [C](https://e.srl/leetcode-42/) | O(n) |6ms| O(1) | Hard |Array|

docs/_posts/2017-12-03-Binary.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: post
3+
keywords: LeetCode, Binary, Algorithm
4+
description: Binary Algorithm in LeetCode
5+
title: "Binary Algorithm in LeetCode"
6+
categories: [Binary]
7+
tags: [Binary, LeetCode]
8+
group: archive
9+
icon: file-alt
10+
---
11+
{% include site/setup %}
12+
13+
|Id | Title | Solution | Time | Runtime | Space | Difficulty | Catagory|
14+
------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------
15+
|0004|[Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays) | [C](https://e.srl/leetcode-4/) | - |45ms| O(1) | Hard |Binary|
16+
|0215|[Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array) | [Java](https://e.srl/leetcode-215/) | O(n\*lgn) |-| O(1) | Medium |Binary|
17+
|0300|[Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence) | [Java](https://e.srl/leetcode-300/) | O(n\*lgn) |0ms| O(n) | Medium |Binary Search DP|
18+
|0327|[Count of Range Sum](https://leetcode.com/problems/count-of-range-sum) | [C](https://e.srl/leetcode-327/) | O(n\*logn) |9ms| O(n) | Hard |Devide|
19+
|0330|[Patching Array](https://leetcode.com/problems/patching-array) | [Java](https://e.srl/leetcode-330/) | O(n) |1ms| O(1) | Hard |Greey|
20+
|0352|[Data Stream as Disjoint Intervals](https://leetcode.com/problems/data-stream-as-disjoint-intervals) | [Java](https://e.srl/leetcode-352/) | O(n\*lgn) |155ms| O(n) | Hard |Binary Search|
21+
|0354|[Russian Doll Envelopes](https://leetcode.com/problems/russian-doll-envelopes) | [Java](https://e.srl/leetcode-354/) | O(n\*lgn) |13ms| O(n) | Hard |Binary Search DP|
22+
|0363|[Max Sum of Rectangle No Larger Than K](https://leetcode.com/problems/max-sum-of-rectangle-no-larger-than-k/) | [Java](https://e.srl/leetcode-363/) | O(n^2\*lgn) |99.55%| O(n) | Hard |Devide|
23+
24+

docs/_posts/2017-12-03-Bit.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: post
3+
keywords: LeetCode, Bit, Algorithm
4+
description: Bit Algorithm in LeetCode
5+
title: "Bit Algorithm in LeetCode"
6+
categories: [Bit]
7+
tags: [Bit, LeetCode]
8+
group: archive
9+
icon: file-alt
10+
---
11+
{% include site/setup %}
12+
13+
|Id | Title | Solution | Time | Runtime | Space | Difficulty | Catagory|
14+
------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------
15+
|0136|[Single Number](https://leetcode.com/problems/single-number) | [Java](https://e.srl/leetcode-136/) | O(n) |1MS| O(1) | Easy |BIT|
16+
|0137|[Single Number II](https://leetcode.com/problems/single-number-ii) | [Java](https://e.srl/leetcode-137/) | O(32n) |9MS| O(1) | Medium |BIT|
17+
|0190|[Reverse Bits](https://leetcode.com/problems/reverse-bits/) | [Java](https://e.srl/leetcode-190/) | O(n) |3MS| O(1) | Easy |BIT|
18+
|0191|[Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/) | [Java](https://e.srl/leetcode-191/) | O(n) |1MS| O(1) | Easy |BIT|
19+
|0201|[Bitwise AND of Numbers Range](https://leetcode.com/problems/bitwise-and-of-numbers-range/) | [Java](https://e.srl/leetcode-201/) | O(n) |9MS| O(1) | Medium |BIT|
20+
|0231|[Power of Two](https://leetcode.com/problems/power-of-two) | [Java](https://e.srl/leetcode-231/) | O(1) |2MS| O(1) | Easy |BIT|
21+
22+
23+
24+
25+
26+
27+

docs/_posts/2017-12-03-DFS-BFS.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: post
3+
keywords: LeetCode, DFS-BFS, Algorithm
4+
description: DFS-BFS Algorithm in LeetCode
5+
title: "DFS-BFS Algorithm in LeetCode"
6+
categories: [DFS-BFS]
7+
tags: [DFS-BFS, LeetCode]
8+
group: archive
9+
icon: file-alt
10+
---
11+
{% include site/setup %}
12+
13+
|Id | Title | Solution | Time | Runtime | Space | Difficulty | Catagory|
14+
------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------
15+
|0037|[Sudoku Solver](https://leetcode.com/problems/sudoku-solver) | [C](https://e.srl/leetcode-37/) | O(n) |0ms| O(n\*n) | Hard |BT|
16+
|0039|[Combination Sum](https://leetcode.com/problems/combination-sum) | [Java](https://e.srl/leetcode-39/) | O(n\*n) |19ms| O(n\*n) | Medium |DFS|
17+
|0040|[Combination Sum II](https://leetcode.com/problems/combination-sum-ii/) | [Java](https://e.srl/leetcode-40/) | O(n\*n) |26ms| O(n\*n) | Medium |DFS|
18+
|0127|[Word Ladder](https://leetcode.com/problems/word-ladder/) | [Java](https://e.srl/leetcode-127/) | O(n\*m\*k) |-| O(n) | Medium |BFS|
19+
|0301|[Remove Invalid Parentheses](https://leetcode.com/problems/remove-invalid-parentheses) | [Java](https://e.srl/leetcode-301/) | - | - | - | Hard |DFS|
20+
|0329|[Longest Increasing Path in a Matrix](https://leetcode.com/problems/longest-increasing-path-in-a-matrix) | [Java](https://e.srl/leetcode-329/) | O(n\*m) |16ms| O(n\*m) | Hard |DFS|
21+
|0576|[Out of Boundary Paths](https://leetcode.com/problems/out-of-boundary-paths)| [Java](https://e.srl/leetcode-576/) | - |95.73%| O(n\*m\*N) | Medium |DFS |
22+
23+
24+
25+
26+
27+

docs/_posts/2017-12-03-DP.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
layout: post
3+
keywords: LeetCode, DP, Algorithm
4+
description: DP Algorithm in LeetCode
5+
title: "DP Algorithm in LeetCode"
6+
categories: [DP]
7+
tags: [DP, LeetCode]
8+
group: archive
9+
icon: file-alt
10+
---
11+
{% include site/setup %}
12+
13+
|Id | Title | Solution | Time | Runtime | Space | Difficulty | Catagory|
14+
------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------
15+
|0010|[Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching) | [C#](https://e.srl/leetcode-10/) | no| | O(m\*n) | Hard |DP|
16+
|0032|[Longest Valid Parentheses](https://leetcode.com/problems/longest-valid-parentheses) | [C](https://e.srl/leetcode-32/) | O(n) |6ms| O(n) | Hard |DP|
17+
|0044|[Wildcard Matching](https://leetcode.com/problems/wildcard-matching/) | [C#](https://e.srl/leetcode-44/) | O(n\*n) |162ms| O(n\*n) | Hard |DP|
18+
|0053|[Maximum Subarray](https://leetcode.com/problems/maximum-subarray) | [Java](https://e.srl/leetcode-53/) | O(n) |17ms| O(n) | Easy |DP|
19+
|0139|[Word Break](https://leetcode.com/problems/word-break/) | [Java](https://e.srl/leetcode-139/) | O(n\*n) |-| O(n) | Medium |DP|
20+
|0140|[Word Break II](https://leetcode.com/problems/word-break-ii/) | [Java](https://e.srl/leetcode-140/) | O(n\*n) |-| O(n) | Hard |DP|
21+
|0152|[Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/) | [Java](https://e.srl/leetcode-152/) | O(n) |-| O(n) | Medium |DP|
22+
|0322|[Coin Change](https://leetcode.com/problems/coin-change/) | [C](https://e.srl/leetcode-322/) | O(n\*k) |12ms| O(n) | Medium |DP|
23+
|0343|[Integer Break](https://leetcode.com/problems/integer-break/) | [Java](https://e.srl/leetcode-343/) | O(n\*n) |1ms| O(n) | Medium |DP|
24+
|0377|[Combination Sum IV](https://leetcode.com/problems/combination-sum-iv/) | [Java](https://e.srl/leetcode-377/) | O(n\*n) |6MS| O(n) | Medium |DP|
25+
|0673|[Number of Longest Increasing Subsequence](https://leetcode.com/problems/number-of-longest-increasing-subsequence/) | [Java](https://e.srl/leetcode-673/) | O(m\*n) |27MS| O(m\*n) |  Medium |DP|
26+
|0583|[Delete Operation for Two Strings](https://leetcode.com/problems/delete-operation-for-two-strings)| [Java](https://e.srl/leetcode-58/) | O(n\*m) |95.08%| O(n\*m) | Medium |DP |

docs/_posts/2017-12-03-Digital.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
layout: post
3+
keywords: LeetCode, Digital, Algorithm
4+
description: Digital Algorithm in LeetCode
5+
title: "Digital Algorithm in LeetCode"
6+
categories: [Digital]
7+
tags: [Digital, LeetCode]
8+
group: archive
9+
icon: file-alt
10+
---
11+
{% include site/setup %}
12+
13+
|Id | Title | Solution | Time | Runtime | Space | Difficulty | Catagory|
14+
------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------
15+
|0007|[Reverse Integer](https://leetcode.com/problems/reverse-integer) | [C](https://e.srl/leetcode-7/) | - |15ms| O(1) | Easy |Digital|
16+
|0008|[String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi) | [C](https://e.srl/leetcode-8/) | -|15ms | O(1) | Medium |Digital|
17+
|0009|[Palindrome Number](https://leetcode.com/problems/palindrome-number) | [C](https://e.srl/leetcode-9/) | - |185ms| O(1) | Easy |Digital|
18+
|0012|[Integer to Roman](https://leetcode.com/problems/integer-to-roman) | [C,C++,C#](https://e.srl/leetcode-12/) | O(n) |49ms| O(1) | Medium |Digital|
19+
|0013|[Roman to Integer](https://leetcode.com/problems/roman-to-integer) | [C++](https://e.srl/leetcode-13/) | O(n) |85ms| O(1) | Easy |Digital|
20+
|0015|[3Sum](https://leetcode.com/problems/3sum) | [C](https://e.srl/leetcode-15/) | O(n\*n) |97.96%| O(n\*n) | Medium |Digital|
21+
|0016|[3Sum Closest](https://leetcode.com/problems/3sum-closest) | [C](https://e.srl/leetcode-16/) | O(n\*n) |6ms| O(1) | Medium |Digital|
22+
|0334|[Increasing Triplet Subsequence](https://leetcode.com/problems/increasing-triplet-subsequence) | [Java](https://e.srl/leetcode-334/) |-|-|-| Medium |DIgital|
23+
24+
25+
26+
27+
28+
29+

docs/_posts/2017-12-03-Greedy.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
layout: post
3+
keywords: LeetCode, Greedy, Algorithm
4+
description: Greedy Algorithm in LeetCode
5+
title: "Greedy Algorithm in LeetCode"
6+
categories: [Greedy]
7+
tags: [Greedy, LeetCode]
8+
group: archive
9+
icon: file-alt
10+
---
11+
{% include site/setup %}
12+
13+
|Id | Title | Solution | Time | Runtime | Space | Difficulty | Catagory|
14+
------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------
15+
|0011|[Container With Most Water](https://leetcode.com/problems/container-with-most-water) | [C](https://e.srl/leetcode-11/) | O(n) |6ms| O(1) | Medium |Greedy|
16+
|0045|[Jump Game II](https://leetcode.com/problems/jump-game-ii) | [C](https://e.srl/leetcode-45/) | O(n) |6ms| O(1) | Hard |Greey|
17+
|0051|[N-Queens](https://leetcode.com/problems/n-queens) | [C](https://e.srl/leetcode-51/) | - |3ms| O(n\*n) | Hard |Greey|
18+
|0316|[Remove Duplicate Letters](https://leetcode.com/problems/remove-duplicate-letters) | [C](https://e.srl/leetcode-316/) | O(n) |3ms| O(n) | Hard |Greedy Stack|
19+
|0321|[Create Maximum Number](https://leetcode.com/problems/create-maximum-number) | [C](https://e.srl/leetcode-321/) | O(n\*k) |12ms| O(n) | Hard |Greedy Stack|
20+
21+
22+
23+

docs/_posts/2017-12-03-Heap.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: post
3+
keywords: LeetCode, Heap, Algorithm
4+
description: Heap Algorithm in LeetCode
5+
title: "Heap Algorithm in LeetCode"
6+
categories: [Heap]
7+
tags: [Heap, LeetCode]
8+
group: archive
9+
icon: file-alt
10+
---
11+
{% include site/setup %}
12+
13+
|Id | Title | Solution | Time | Runtime | Space | Difficulty | Catagory|
14+
------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------
15+
|0023|[Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists) | [C,Java](https://e.srl/leetcode-23/) | O(n\*logn) |9ms| O(n) | Hard |Heap|
16+
17+
18+
19+
20+
21+
22+
23+
24+

0 commit comments

Comments
 (0)