Coder Social home page Coder Social logo

leetcode's Introduction

Java solutions of Leetcode

参考题目分类

Array

# Title Solution Difficulty
26 Remove Duplicates from Sorted Array code/note Easy
27 Remove Element code/note Easy
35 Search Insert Position code/note Easy
54 Spiral Matrix code/note Medium
66 Plus One code/note Easy
88 Merge Sorted Array code/note Easy
118 Pascal's Triangle code/note Easy
119 Pascal's Triangle II code/note Easy
121 Best Time to Buy and Sell Stock code/note Easy
122 Best Time to Buy and Sell Stock 2 code/note Easy
134 Gas Station code/note Medium
167 Two Sum II - Input array is sorted code/note Easy
169 Majority Element code/note Easy
189 Rotate Array code/note Easy
209 Minimum Size Subarray Sum code/note Easy
278 First Bad Version code/note Easy
283 Move Zeroes code/note Easy
299 Bulls and Cows code/note Medium
303 Range Sum Query - Immutable code/note Easy
374 Guess Number Higher or Lower code/note Easy
414 Third Maximum Number code/note Easy
448 Find All Numbers Disappeared in an Array code/note Easy
475 Heaters code/note Easy
485 Max Consecutive Ones code/note Easy
496 Next Greater Element I code/note Easy
498 Diagonal Traverse code/note Medium
506 Relative Ranks code/note Easy
532 K-diff Pairs in an Array code/note Easy
561 Array Partition I code/note Easy
581 Shortest Unsorted Continuous Subarray code/note Easy
566 Reshape the Matrix code/note Easy
605 Can Place Flowers code/note Easy
628 Maximum Product of Three Numbers code/note Easy
643 Maximum Average Subarray I code/note Easy
661 Image Smoother code/note Easy
674 Longest Continuous Increasing Subsequence code/note Easy
697 Degree of an Array code/note Easy
704 Binary Search code/note Easy
717 1-bit and 2-bit Characters code/note Easy
724 Find pivot index code/note Easy
733 Flood Fill code/note Easy
744 Find Smallest Letter Greater Than Target code/note Easy
747 Largest Number At Least Twice of Others code/note Easy

String

# Title Solution Difficulty
13 Roman to Integer code/note Easy
14 Longest Common Prefix code/note Easy
28 Implement strStr() code/note Easy
38 Count and Say code/note Easy
58 Length of Last Word code/note Easy
67 Add Binary code/note Easy
151 Reverse Words in a String code/note Medium
242 Valid Anagram code/note Easy
344 Reverse String code/note Easy
345 Reverse Vowels of a String code/note Easy
383 Ransom Note code/note Easy
412 Fizz Buzz code/note Easy
415 Add Strings code/note Easy
434 Number of Segments in a String code/note Easy
443 String Compression code/note Easy
482 License Key Formatting code/note Easy
459 Repeated Substring Pattern code/note Easy
520 Detect Capital code/note Easy
521 Longest Uncommon Subsequence I code/note Easy
541 Reverse String II code/note Easy
551 Student Attendance Record I code/note Easy
557 Reverse Words in a String III code/note Medium
657 Robot Return to Origin code/note Easy
686 Repeated String Match code/note Easy
709 To Lower Case code/note Easy

hashTable

# Title Solution Difficulty
1 Two Sum code/note Easy
3 Longest Substring Without Repeating Characters code/note Medium
36 Valid Sudoku code/note Medium
49 Group Anagrams code/note Medium
136 Single Number code/note Easy
202 Happy Number code/note Easy
205 Isomorphic Strings code/note Easy
217 Contains Duplicate code/note Easy
219 Contains Duplicate II code/note Easy
290 Word Pattern code/note Easy
347 Top K Frequent Elements code/note Medium
349 Intersection of Two Arrays code/note Easy
350 Intersection of Two Arrays II code/note Easy
380 Insert Delete GetRandom O(1) code/note Medium
387 First Unique Character in a String code/note Easy
389 Find the Difference code/note Easy
409 Longest Palindrome code/note Easy
447 Number of Boomerangs code/note Easy
454 4Sum II code/note Medium
500 Keyboard Row code/note Easy
594 Longest Harmonious Subsequence code/note Easy
575 Distribute Candies code/note Easy
599 Minimum Index Sum of Two Lists code/note Easy
645 Set Mismatch code/note Easy
652 Find Duplicate Subtrees code/note Medium
705 Design HashSet code/note Easy
706 Design HashMap code/note Easy
720 Longest Word in Dictionary code/note Easy
771 Jewels and Stones code/note Easy

Recursion

# Title Solution Difficulty
21 Merge Two Sorted Lists code/note Easy
24 Swap Nodes in Pairs code/note Medium
50 Pow(x, n) code/note Medium
70 Climbing Stairs code/note Easy
95 Unique Binary Search Trees II code/note Medium
104 Maximum Depth of Binary Tree code/note Easy
206 Reverse Linked List code/note Easy
509 Fibonacci Number code/note Easy
779 K-th Symbol in Grammar code/note Medium

Tree

# Title Solution Difficulty
94 Binary Tree Inorder Traversal code/note Medium
100 Same Tree code/note Easy
101 Symmetric Tree code/note Easy
102 Binary Tree Level Order Traversal code/note Medium
108 Convert Sorted Array to Binary Search Tree code/note Easy
110 Balanced Binary Tree code/note Easy
111 Minimum Depth of Binary Tree code/note Easy
112 Path Sum code/note Easy
114 Flatten Binary Tree to Linked List code/note Medium
144 Binary Tree Preorder Traversal code/note Medium
215 Kth Largest Element in an Array code/note Medium
235 Lowest Common Ancestor of a Binary Search Tree code/note Easy
257 Binary Tree Paths code/note Medium
226 Invert Binary Tree code/note Easy
337 House Robber III code/note Medium
404 Sum of Left Leaves code/note Easy
429 n-ary-tree-level-order-traversal code/note Easy
437 Path Sum III code/note Easy
501 Find Mode in Binary Search Tree code/note Easy
532 Minimum Absolute Difference in BST code/note Easy
538 Convert BST to Greater Tree code/note Easy
543 Diameter of Binary Tree code/note Easy
559 Maximum Depth of N-ary Tree code/note Easy
563 Binary Tree Tilt code/note Easy
572 Subtree of Another Tree code/note Easy
606 Construct String from Binary Tree code/note Easy
617 Merge Two Binary Trees code/note Easy
637 Average of Levels in Binary Tree code/note Easy
653 Two Sum IV - Input is a BST code/note Easy
669 Trim a Binary Search Tree code/note Easy
671 Second Minimum Node In a Binary Tree code/note Easy
700 Search in a Binary Search Tree code/note Easy

Math

# Title Solution Difficulty
7 Reverse Integer code/note Easy
9 Palindrome Number code/note Easy
171 Excel Sheet Column Number code/note Easy
172 Factorial Trailing Zeroes code/note Easy
204 Count Primes code/note Easy
258 Add Digits code/note Easy
263 Ugly Number code/note Easy
278 Count Primes code/note Easy
292 Nim Game code/note Easy
292 Nim Game code/note Easy
326 Power of Three code/note Easy
342 Power of Four code/note Easy
441 Arranging Coins code/note Easy
453 Minimum Moves to Equal Array Elements code/note Easy
458 Poor Pigs code/note Hard
463 Island Perimeter code/note Easy
492 Construct the Rectangle code/note Easy
504 Base 7 code/note Easy
507 Perfect Number code/note Easy
633 Sum of Square Numbers code/note Easy
728 Self Dividing Numbers code/note Easy
1025 Divisor Game code/note Easy

Bit

# Title Solution Difficulty
190 Reverse Bits code/note Easy
191 Number of 1 Bits code/note Easy
231 Power of Two code/note Easy
268 Missing Number code/note Easy
338 Counting Bits code/note Medium
371 Sum of Two Integers code/note Medium
401 Binary Watch code/note Easy
405 Convert a Number to Hexadecimal code/note Easy
476 Number Complement code/note Easy
461 Hamming Distance code/note Easy
693 Binary Number with Alternating Bits code/note Easy

Dynamic Programming

# Title Solution Difficulty
53 Maximum Subarray code/note Easy
64 Minimum Path Sum code/note Medium
139 Word Break code/note Medium
198 House Robber code/note Easy
213 House Robber II code/note Medium
279 Perfect Squares code/note Medium
300 Longest Increasing Subsequence code/note Medium
746 Min Cost Climbing Stairs code/note Easy
1027 Longest Arithmetic Sequence code/note Medium

Stack and Queue

# Title Solution Difficulty
20 Valid Parentheses code/note Easy
71 Simplify Path code/note Medium
155 Min Stack code/note Easy
225 Implement Stack using Queues code/note Easy
232 Implement Queue using Stacks code/note Easy
682 Baseball Game code/note Easy

LinkedList

# Title Solution Difficulty
83 Remove Duplicates from Sorted List code/note Easy
141 Linked List Cycle code/note Easy
160 Intersection of Two Linked Lists code/note Easy
203 Remove Linked List Elements code/note Easy
234 Palindrome Linked List code/note Easy
237 Delete Node in a Linked List code/note Easy

Backtracking

# Title Solution Difficulty
17 Letter Combinations of a Phone Number code/note Medium
93 Restore IP Addresses code/note Medium

Sql

# Title Solution Difficulty
175 Combine Two Tables code Easy
176 Second Highest Salary code Easy

graph

# Title Solution Difficulty
1202 Smallest String With Swaps code/note Medium

Greedy

# Title Solution Difficulty
455 Assign Cookies code/note Easy
680 Valid Palindrome II code/note Easy
754 Reach a Number code/note Easy

leetcode's People

Contributors

lunaticf avatar

Stargazers

 avatar

Watchers

 avatar  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.