Code Monkey home page Code Monkey logo

leetcode's Introduction

LeetCode

 

LeetCode Solution in Java

Topics

Math

# Title Solution Difficulty
8 Reverse Integer Java Easy
9 Palindrome Number Java Easy
43 Multiply Strings (Classic) Java Medium
50 Pow(x, n) Java Medium
66 Plus One Java Easy
67 Add Binary Java Easy
204 Count Primes Java Easy
415 Add Strings Java Easy
989 Add to Array-Form of Integer Java Easy
1232 Check If It Is a Straight Line Java Easy

Bit

# Title Solution Difficulty
136 Single Number Java Easy
191 Number of 1 Bits Java Easy
231 Power of Two Java Easy
371 Sum of Two Integers Java Medium
461 Hamming Distance Java Easy
477 Total Hamming Distance Java Medium

Array/String

# Title Solution Difficulty
1 Two Sum Java Easy
6 ZigZag Conversion Java Medium
8 String to Integer (atoi) (Classic) Java Medium
12 Integer to Roman Java Medium
13 Roman to Integer Java Easy
15 3Sum Java Medium
18 4Sum Java Medium
26 strStr (Classic) Java Easy
31 Next Permutation (Classic) Java Medium
32 Longest Valid Parentheses Java Hard
33 Search in Rotated Sorted Array (Classic) Java Medium
34 Find First and Last Position of Element in Sorted Array (Classic) Java Medium
35 Search Insert Position (Classic) Java Easy
38 Count and Say Java Medium
42 Trapping Rain Water (Classic) Java Hard
56 Merge Intervals (Classic) Java Medium
57 Insert Interval (Classic) Java Medium
58 Length of Last Word Java Easy
88 Merge Sorted Array Java Medium
118 Pascal's Triangle Java Easy
119 Pascal's Triangle II Java Easy
135 Candy Java Hard
153 Find Minimum in Rotated Sorted Array (Classic) Java Medium
154 Find Minimum in Rotated Sorted Array II Java Hard
162 Find Peak Element Java Medium
163 Missing Ranges Java Easy
164 Maximum Gap Java Hard
165 Compare Version Numbers Java Medium
167 Two Sum II - Input array is sorted Java Easy
179 Largest Number (Classic) Java Medium
189 Rotate Array Java Medium
205 Isomorphic Strings Java Easy
228 Summary Ranges Java Easy
238 Product of Array Except Self (Classic) Java Medium
242 Valid Anagram Java Easy
278 First Bad Version Java Easy
345 Reverse Vowels of a String Java Easy
349 Intersection of Two Arrays Java Easy
350 Intersection of Two Arrays II Java Easy
414 Third Maximum Number (Classic) Java Easy
442 Find All Duplicates in an Array Java Medium
448 Find All Numbers Disappeared in an Array Java Easy
459 Repeated Substring Pattern Java Easy
509 Fibonacci Number Java Easy
541 Reverse String II Java Easy
557 Reverse Words in a String III Java Easy
605 Can Place Flowers Java Easy
628 Maximum Product of Three Numbers Java Easy
665 Non-decreasing Array Java Medium
704 Binary Search Java Easy
852 Peak Index in a Mountain Array Java Easy
860 Lemonade Change Java Easy
905 Sort Array By Parity Java Easy
922 Sort Array By Parity II Java Easy
941 Valid Mountain Array Java Easy
1002 Find Common Characters Java Easy
1095 Find in Mountain Array Java Hard
1108 Defanging an IP Address Java Easy
1370 Increasing Decreasing String Java Easy
1480 Running Sum of 1d Array Java Easy
1502 Can Make Arithmetic Progression From Sequence Java Easy

Two Pointers

# Title Solution Difficulty
11 Container With Most Water Java Medium
26 Remove Duplicates from Sorted Array Java Easy
27 Remove Element Java Easy
80 Remove Duplicates from Sorted Array II (Classic) Java Medium
75 Sort Colors Java Medium
125 Valid Palindrome Java Easy
283 Move Zeroes Java Easy
344 Reverse String Java Easy
1119 Remove Vowels from a String Java Easy

Matrix

# Title Solution Difficulty
36 Valid Sudoku Java Medium
48 Rotate Image (Classic) Java Medium
54 Spiral Matrix (Classic) Java Medium
59 Spiral Matrix II Java Medium
73 Set Matrix Zeroes (Classic) Java Medium
74 Search a 2D Matrix Java Medium
240 Search a 2D Matrix II Java Medium
498 Diagonal Traverse Java Medium
867 Transpose Matrix Java Easy

Linked List

# Title Solution Difficulty
2 Add Two Numbers Java Medium
19 Remove Nth Node From End of List Java Medium
21 Merge Two Sorted Lists Java Easy
25 Reverse Nodes in k-Group (Classic) Java Hard
82 Remove Duplicates from Sorted List II (Classic) Java Medium
83 Remove Duplicates from Sorted List (Classic) Java Easy
138 Copy List with Random Pointer (Classic) Java Medium
141 Linked List Cycle Java Easy
142 Linked List Cycle II Java Medium
143 Reorder List Java Medium
147 Insertion Sort List Java Medium
148 Sort List Java Medium
160 Intersection of Two Linked Lists Java Easy
203 Remove Linked List Elements Java Easy
206 Reverse Linked List Java Easy
234 Palindrome Linked List (Classic) Java Easy
328 Odd Even Linked List Java Medium
445 Add Two Numbers II Java Medium
707 Design Linked List Java Medium
876 Middle of the Linked List Java Easy
1265 Print Immutable Linked List in Reverse Java Easy

Hash Table

# Title Solution Difficulty
128 Longest Consecutive Sequence Java Hard
771 Jewels and Stones Java Easy
888 Fair Candy Swap Java Easy

Stack/Queue

# Title Solution Difficulty
20 Valid Parentheses Java Easy
155 Min Stack Java Easy
225 Implement Stack using Queues Java Easy
232 Implement Queue using Stacks Java Easy
739 Daily Temperatures Java Medium
946 Validate Stack Sequences (Classic) Java Medium
1047 Remove All Adjacent Duplicates In String Java Easy

Tree

Important

# Title Solution Difficulty
98 Validate Binary Search Tree Java Medium
100 Same Tree Java Easy
101 Symmetric Tree Java Easy
104 Maximum Depth of Binary Tree Java Easy
111 Minimum Depth of Binary Tree Java Easy
112 Path Sum Java Easy
114 Flatten Binary Tree to Linked List Java Medium
116 Populating Next Right Pointers in Each Node Java Medium
129 Sum Root to Leaf Numbers Java Medium
173 Binary Search Tree Iterator Java Medium
199 Binary Tree Right Side View Java Medium
222 Count Complete Tree Nodes Java Medium
226 Invert Binary Tree Java Easy
235 Lowest Common Ancestor of a Binary Search Tree Java Easy
236 Lowest Common Ancestor of a Binary Tree Java Medium
257 Binary Tree Paths Java Easy
297 Serialize and Deserialize Binary Tree Java Hard
653 Two Sum IV - Input is a BST Java Easy

Heap

# Title Solution Difficulty
23 Merge k Sorted Lists (Classic) Java Hard
215 Kth Largest Element in an Array Java Medium
295 Find Median from Data Stream (Classic) Java Hard
703 Kth Largest Element in a Stream Java Easy

Graph

# Title Solution Difficulty

Greedy

# Title Solution Difficulty
45 Jump Game II Java Medium
55 Jump Game Java Medium

Backtracking

# Title Solution Difficulty
17 Letter Combinations of a Phone Number Java Medium
22 Generate Parentheses Java Medium
39 Sudoku Solver (Classic) Java Hard
39 Combination Sum Java Medium
40 Combination Sum II (Classic) Java Medium
46 Permutations Java Medium
47 Permutations II (Classic) Java Medium
51 N-Queens (Classic) Java Hard
77 Combinations Java Medium
78 Subsets Java Medium
90 Subsets II (Classic) Java Medium
93 Restore IP Addresses (Classic) Java Medium
113 Path Sum II Java Medium
216 Combination Sum III Java Medium
437 Path Sum III Java Medium

Divide and Conquer

# Title Solution Difficulty
69 Sqrt(x) Java Easy
493 Reverse Pairs (Classic) Java Hard
1539 Kth Missing Positive Number (Classic) Java Easy

Dynamic Programming

Important

# Title Solution Difficulty
5 Longest Palindromic Substring (Classic) Java Medium
44 Wildcard Matching (Classic) Java Hard
53 Maximum Subarray Java Easy
62 Unique Paths Java Medium
63 Unique Paths II Java Medium
64 Minimum Path Sum (Classic) Java Medium
70 Climbing Stairs Java Easy
72 Edit Distance (Classic) Java Hard
96 Unique Binary Search Trees (Classic) Java Medium
115 Distinct Subsequences Java Hard
131 Palindrome Partitioning Java Medium
221 Maximal Square (Classic) Java Medium
300 Longest Increasing Subsequence (Classic) Java Medium
313 Super Ugly Number (Classic) Java Medium
322 Coin Change (Classic) Java Medium
343 Integer Break Java Medium
368 Largest Divisible Subset Java Medium
486 Predict the Winner (Classic) Java Medium
516 Longest Palindromic Subsequence (Classic) Java Medium
518 Coin Change 2 (Classic) Java Medium
647 Palindromic Substrings Java Medium
746 Min Cost Climbing Stairs Java Medium
1143 Longest Common Subsequence (Classic) Java Medium
1155 Number of Dice Rolls With Target Sum Java Medium

Trie

# Title Solution Difficulty
208 Implement Trie (Prefix Tree) Java Medium

Design

# Title Solution Difficulty
1244 Design A Leaderboard Java Medium
1396 Design Underground System Java Medium

leetcode's People

Contributors

maxyzli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.