Skip to content

enihsyou/LeetCode

Repository files navigation

LeetCode Practices

Java CI with Gradle

List of solutions

No. Id. Name Solutions Last Update
1 1 Two Sum Java
Kotlin
2020-09-09 21:42
2 2 Add Two Numbers Kotlin 2020-09-06 18:42
3 3 Longest Substring Without Repeating Characters Kotlin 2020-09-06 18:42
4 4 Median of Two Sorted Arrays Java
Kotlin
2020-09-17 23:33
5 5 Longest Palindromic Substring Kotlin 2020-09-06 18:42
12 12 Integer to Roman Java 2020-09-06 18:40
13 13 Roman to Integer Java 2020-09-06 18:40
15 15 3Sum Kotlin 2020-09-06 18:42
17 17 Letter Combinations of a Phone Number Java 2020-09-06 18:42
18 18 4Sum Java 2020-09-17 15:32
20 20 Valid Parentheses Java 2020-09-06 18:42
21 21 Merge Two Sorted Lists Java 2020-09-17 15:51
22 22 Generate Parentheses Java 2020-09-06 01:23
23 23 Merge k Sorted Lists Java 2020-09-17 16:06
24 24 Swap Nodes in Pairs Java 2020-09-17 01:35
26 26 Remove Duplicates from Sorted Array Kotlin 2020-09-06 18:42
33 33 Search in Rotated Sorted Array Java 2020-09-17 02:18
34 34 Find First and Last Position of Element in Sorted Array Java 2020-09-18 01:54
35 35 Search Insert Position Java 2020-09-17 22:26
36 36 Valid Sudoku Java 2020-09-14 01:01
37 37 Sudoku Solver Java 2020-09-16 01:45
39 39 Combination Sum Java 2020-09-12 16:10
40 40 Combination Sum II Java 2020-09-13 02:15
48 48 Rotate Image Java 2020-09-14 22:34
53 53 Maximum Subarray Java 2020-09-06 18:42
56 56 Merge Intervals Kotlin 2020-09-06 18:42
65 65 Valid Number Kotlin 2020-09-06 18:42
66 66 Plus One Java 2020-09-09 21:21
67 67 Add Binary Java 2020-09-10 00:47
77 77 Combinations Java 2020-09-12 02:19
79 79 Word Search Java 2020-09-13 17:59
81 81 Search in Rotated Sorted Array II Java 2020-09-18 11:21
88 88 Merge Sorted Array Java 2020-09-19 01:00
94 94 Binary Tree Inorder Traversal Java 2020-09-16 01:59
122 122 Best Time to Buy and Sell Stock II Kotlin 2020-09-06 18:42
136 136 Single Number Java 2020-09-10 00:55
137 137 Single Number II Java 2020-09-10 01:52
153 153 Find Minimum in Rotated Sorted Array Java 2020-09-18 12:02
154 154 Find Minimum in Rotated Sorted Array II Java 2020-09-18 12:13
175 175 Combine Two Tables MySQL 2020-09-06 18:58
176 176 Second Highest Salary MySQL 2020-09-06 18:58
178 178 Rank Scores MySQL 2020-09-06 18:58
182 182 Duplicate Emails MySQL 2020-09-06 18:58
189 189 Rotate Array Java 2020-09-13 22:25
190 190 Reverse Bits Java 2020-09-13 23:12
191 191 Number of 1 Bits Java 2020-09-06 18:42
192 192 Word Frequency Bash 2020-09-06 18:58
198 198 House Robber Java 2020-09-17 00:00
204 204 Count Primes Java 2020-09-18 16:20
205 205 Isomorphic Strings Java 2020-09-18 16:49
206 206 Reverse Linked List Java 2020-09-18 17:07
216 216 Combination Sum III Java 2020-09-13 22:18
217 217 Contains Duplicate Java 2020-09-14 00:27
226 226 Invert Binary Tree Java 2020-09-16 01:59
257 257 Binary Tree Paths Java 2020-09-19 00:31
260 260 Single Number III Java 2020-09-10 02:03
268 268 Missing Number Java 2020-09-06 18:42
300 300 Longest Increasing Subsequence Java 2020-09-18 13:45
349 349 Intersection of Two Arrays Java 2020-09-11 15:03
350 350 Intersection of Two Arrays II Java 2020-09-11 15:13
371 371 Sum of Two Integers Kotlin 2020-09-06 18:42
381 381 Insert Delete GetRandom O(1) - Duplicates allowed Java 2020-09-06 18:42
401 401 Binary Watch Java 2020-09-06 18:42
404 404 Sum of Left Leaves Java 2020-09-19 00:51
405 405 Convert a Number to Hexadecimal Java 2020-09-06 18:42
535 535 Encode and Decode TinyURL Java 2020-09-16 23:30
704 792 Binary Search Java 2020-09-18 01:05
807 825 Max Increase to Keep City Skyline Java 2020-09-16 23:45
811 829 Subdomain Visit Count Java 2020-09-11 18:12
852 882 Peak Index in a Mountain Array Java 2020-09-18 15:12
867 898 Transpose Matrix Java 2020-09-10 22:34
986 1028 Interval List Intersections Kotlin 2020-09-11 17:54
1002 1044 Find Common Characters Java 2020-09-11 17:54
1095 1185 Find in Mountain Array Java 2020-09-18 15:32
1114 1203 Print in Order Java 2020-09-06 18:42
1108 1205 Defanging an IP Address Java 2020-09-16 23:16
1431 1528 Kids With the Greatest Number of Candies Java 2020-09-16 18:36
1476 1572 Subrectangle Queries Java 2020-09-16 17:08
1470 1580 Shuffle the Array Java 2020-09-16 19:11
1480 1603 Running Sum of 1d Array Java 2020-09-16 02:20
1486 1610 XOR Operation in an Array Java 2020-09-17 13:41
1512 1635 Number of Good Pairs Java
Python
2020-09-16 17:23
1572 1677 Matrix Diagonal Sum Java 2020-09-16 23:11
面试题 02.03 100187 Delete Middle Node LCCI Java 2020-09-16 23:03
面试题 16.01 100258 Swap Numbers LCCI Java 2020-09-16 23:05
剑指 Offer 58 - II 100330 左旋转字符串 LCOF Java 2020-09-16 21:59
剑指 Offer 64 100345 求1+2+…+n LCOF Java 2020-09-16 22:27
面试题 10.01 1000012 Sorted Merge LCCI Java 2020-09-17 22:12
LCP 17 1000139 速算机器人 Java 2020-09-16 02:14

No. column is the problem id display in web page.
Id. column is the true problem id used by various LeetCode API.

How to start a new problem?

python3 orchestra/orchestra.py
# then enter a URL refers to LeetCode problem and 
# select one language you preferred.

IntelliJ should popup right after the solution file had been created. Due to the lack of API support exposed by Jetbrains platform, a Reload All Gradle Projects action should be performed manually in order to make IntelliJ pick up the newly created source set.

If you choose Java as the implementation language, you will notice a SolutionTest static nest class has been created inside regular Solution template, and it extends JavaBase<Solution>. This super class provides auto test discovery and many useful helper methods, refer to my implementation as example.

What if you want to start over and build your own solution codebase? Simply delete all sub folders inside solution directory and here you go, remember to run gradle test before submit your solution.

old script is deprecated.

How to generate this README file?

This script (table_of_solutions.py) will iterate through files in the latest commit tree in solution directory, and record file's last commit timestamp. Then replace <!-- table of solutions --> section in this file with preformatted markdown table.

python3 ./table_of_solutions.py

About

LeetCode练习题,TDD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published