GithubHelp home page GithubHelp logo

diguage / leetcode Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 3.0 20.77 MB

LeetCode

Home Page: https://diguage.github.io/leetcode/

License: Apache License 2.0

Java 97.04% Python 2.91% Shell 0.05%
interview leetcode algorithm data-structures array stack queue tree graph divide-and-conquer

leetcode's Introduction

LeetCode

LeetCode Problems

# Title Solution Note Difficulty

1

Two Sum

Java

Note

Easy

2

Add Two Numbers

Java

Note

Medium

3

Longest Substring Without Repeating Characters

Java

Note

Medium

4

Median of Two Sorted Arrays

Java

Note

Hard

5

Longest Palindromic Substring

Java

Note

Medium

6

ZigZag Conversion

Java

Note

Medium

7

Reverse Integer

Java

Note

Easy

8

String to Integer (atoi)

Java

Note

Medium

9

Palindrome Number

Java

Note

Easy

11

Container With Most Water

Java

Note

Medium

12

Integer to Roman

Java

Note

Medium

13

Roman to Integer

Java

Note

Easy

14

Longest Common Prefix

Java

Note

Easy

15

3Sum

Java

Note

Medium

16

3Sum Closest

Java

Note

Medium

17

Letter Combinations of a Phone Number

Java

Note

Medium

18

4Sum

Java

Note

Medium

19

Remove Nth Node From End of List

Java

Note

Medium

20

Valid Parentheses

Java

Note

Easy

21

Merge Two Sorted Lists

Java

Note

Easy

22

Generate Parentheses

Java

Note

Medium

23

Merge k Sorted Lists

Java

Note

Hard

24

Swap Nodes in Pairs

Java

Note

Medium

26

Remove Duplicates from Sorted Array

Java

Note

Easy

27

Remove Element

Java

Note

Easy

28

Implement strStr()

Java

Note

Easy

29

Divide Two Integers

Java

Note

Medium

31

Next Permutation

Java

Note

Medium

33

Search in Rotated Sorted Array

Java

Note

Medium

34

Find First and Last Position of Element in Sorted Array

Java

Note

Medium

35

Search Insert Position

Java

Note

Easy

36

Valid Sudoku

Java

Note

Medium

38

Count and Say

Java

Note

Easy

39

Combination Sum

Java

Note

Medium

40

Combination Sum II

Java

Note

Medium

41

First Missing Positive

Java

Note

Hard

42

Trapping Rain Water

Java

Note

Hard

43

Multiply Strings

Java

Note

Medium

45

Jump Game II

Java

Note

Hard

46

Permutations

Java

Note

Medium

47

Permutations II

Java

Note

Medium

48

Rotate Image

Java

Note

Medium

49

Group Anagrams

Java

Note

Medium

50

Pow(x, n)

Java

Note

Medium

51

N-Queens

Java

Note

Hard

52

N-Queens II

Java

Note

Hard

53

Maximum Subarray

Java

Note

Easy

54

Spiral Matrix

Java

Note

Medium

55

Jump Game

Java

Note

Medium

56

Merge Intervals

Java

Note

Medium

58

Length of Last Word

Java

Note

Easy

59

Spiral Matrix II

Java

Note

Medium

60

Permutation Sequence

Java

Note

Medium

61

Rotate List

Java

Note

Medium

62

Unique Paths

Java

Note

Medium

63

Unique Paths II

Java

Note

Medium

64

Minimum Path Sum

Java

Note

Medium

66

Plus One

Java

Note

Easy

67

Add Binary

Java

Note

Easy

69

Sqrt(x)

Java

Note

Easy

70

Climbing Stairs

Java

Note

Easy

71

Simplify Path

Java

Note

Medium

73

Set Matrix Zeroes

Java

Note

Medium

75

Sort Colors

Java

Note

Medium

76

Minimum Window Substring

Java

Note

Hard

77

Combinations

Java

Note

Medium

78

Subsets

Java

Note

Medium

79

Word Search

Java

Note

Medium

80

Remove Duplicates from Sorted Array II

Java

Note

Medium

81

Search in Rotated Sorted Array II

Java

Note

Medium

82

Remove Duplicates from Sorted List II

Java

Note

Medium

83

Remove Duplicates from Sorted List

Java

Note

Easy

86

Partition List

Java

Note

Medium

88

Merge Sorted Array

Java

Note

Easy

89

Gray Code

Java

Note

Medium

90

Subsets II

Java

Note

Medium

91

Decode Ways

Java

Note

Medium

92

Reverse Linked List II

Java

Note

Medium

93

Restore IP Addresses

Java

Note

Medium

94

Binary Tree Inorder Traversal

Java

Note

Medium

96

Unique Binary Search Trees

Java

Note

Medium

98

Validate Binary Search Tree

Java

Note

Medium

100

Same Tree

Java

Note

Easy

101

Symmetric Tree

Java

Note

Easy

102

Binary Tree Level Order Traversal

Java

Note

Medium

103

Binary Tree Zigzag Level Order Traversal

Java

Note

Medium

104

Maximum Depth of Binary Tree

Java

Note

Easy

105

Construct Binary Tree from Preorder and Inorder Traversal

Java

Note

Medium

106

Construct Binary Tree from Inorder and Postorder Traversal

Java

Note

Medium

107

Binary Tree Level Order Traversal II

Java

Note

Easy

108

Convert Sorted Array to Binary Search Tree

Java

Note

Easy

109

Convert Sorted List to Binary Search Tree``

Java

Note

Medium

110

Balanced Binary Tree

Java

Note

Easy

111

Minimum Depth of Binary Tree

Java

Note

Easy

112

Path Sum

Java

Note

Easy

113

Path Sum II

Java

Note

Medium

114

Flatten Binary Tree to Linked List

Java

Note

Medium

116

Populating Next Right Pointers in Each Node

Java

Note

Medium

117

Populating Next Right Pointers in Each Node II

Java

Note

Medium

118

Pascal’s Triangle

Java

Note

Easy

119

Pascal’s Triangle II

Java

Note

Easy

120

Triangle

Java

Note

Medium

121

Best Time to Buy and Sell Stock

Java

Note

Easy

122

Best Time to Buy and Sell Stock II

Java

Note

Easy

123

Best Time to Buy and Sell Stock III

Java

Note

Hard

125

Valid Palindrome

Java

Note

Easy

127

Word Ladder

Java

Note

Medium

129

Sum Root to Leaf Numbers

Java

Note

Medium

130

Surrounded Regions

Java

Note

Medium

131

Palindrome Partitioning

Java

Note

Medium

133

Clone Graph

Java

Note

Medium

134

Gas Station

Java

Note

Medium

136

Single Number

Java

Note

Easy

138

Copy List with Random Pointer

Java

Note

Medium

139

Word Break

Java

Note

Medium

141

Linked List Cycle

Java

Note

Easy

142

Linked List Cycle II

Java

Note

Medium

144

Binary Tree Preorder Traversal

Java

Note

Medium

145

Binary Tree Postorder Traversal

Java

Note

Hard

146

LRU Cache

Java

Note

Medium

148

Sort List

Java

Note

Medium

150

Evaluate Reverse Polish Notation

Java

Note

Medium

152

Maximum Product Subarray

Java

Note

Medium

153

Find Minimum in Rotated Sorted Array

Java

Note

Medium

154

Find Minimum in Rotated Sorted Array II

Java

Note

Hard

155

Min Stack

Java

Note

Easy

160

Intersection of Two Linked Lists

Java

Note

Easy

162

Find Peak Element

Java

Note

Medium

166

Fraction to Recurring Decimal

Java

Note

Medium

167

Two Sum II - Input array is sorted

Java

Note

Easy

169

Majority Element

Java

Note

Easy

171

Excel Sheet Column Number

Java

Note

Easy

172

Factorial Trailing Zeroes

Java

Note

Easy

175

Combine Two Tables

SQL

Note

Easy

176

Second Highest Salary

SQL

Note

Easy

179

Largest Number

Java

Note

Medium

188

Best Time to Buy and Sell Stock IV

Java

Note

Hard

189

Rotate Array

Java

Note

Easy

190

Reverse Bits

Java

Note

Easy

191

Number of 1 Bits

Java

Note

Easy

198

House Robber

Java

Note

Easy

200

Number of Islands

Java

Note

Medium

202

Happy Number

Java

Note

Easy

204

Count Primes

Java

Note

Easy

206

Reverse Linked List

Java

Note

Easy

207

Course Schedule

Java

Note

Medium

208

Implement Trie (Prefix Tree)

Java

Note

Medium

210

Course Schedule II

Java

Note

Medium

215

Kth Largest Element in an Array

Java

Note

Medium

217

Contains Duplicate

Java

Note

Easy

221

Maximal Square

Java

Note

Medium

226

Invert Binary Tree

Java

Note

Easy

227

Basic Calculator II

Java

Note

Medium

230

Kth Smallest Element in a BST

Java

Note

Medium

234

Palindrome Linked List

Java

Note

Easy

236

Lowest Common Ancestor of a Binary Tree

Java

Note

Medium

237

Delete Node in a Linked List

Java

Note

Easy

238

Product of Array Except Self

Java

Note

Medium

239

Sliding Window Maximum

Java

Note

Hard

240

Search a 2D Matrix II

Java

Note

Medium

242

Valid Anagram

Java

Note

Easy

268

Missing Number

Java

Note

Easy

279

Perfect Squares

Java

Note

Medium

283

Move Zeroes

Java

Note

Easy

287

Find the Duplicate Number

Java

Note

Medium

289

Game of Life

Java

Note

Medium

297

Serialize and Deserialize Binary Tree

Java

Note

Hard

300

Longest Increasing Subsequence

Java

Note

Medium

309

Best Time to Buy and Sell Stock with Cooldown

Java

Note

Medium

322

Coin Change

Java

Note

Medium

324

Wiggle Sort II

Java

Note

Medium

326

Power of Three

Java

Note

Easy

328

Odd Even Linked List

Java

Note

Medium

334

Increasing Triplet Subsequence

Java

Note

Medium

337

House Robber III

Java

Note

Medium

338

Counting Bits

Java

Note

Medium

341

Flatten Nested List Iterator

Java

Note

Medium

343

Integer Break

Java

Note

Medium

344

Reverse String

Java

Note

Easy

347

Top K Frequent Elements

Java

Note

Medium

350

Intersection of Two Arrays II

Java

Note

Easy

371

Sum of Two Integers

Java

Note

Easy

378

Kth Smallest Element in a Sorted Matrix

Java

Note

Medium

380

Insert Delete GetRandom O(1)

Java

Note

Medium

384

Shuffle an Array

Java

Note

Medium

387

First Unique Character in a String

Java

Note

Easy

394

Decode String

Java

Note

Medium

395

Longest Substring with At Least K Repeating Characters

Java

Note

Medium

406

Queue Reconstruction by Height

Java

Note

Medium

412

Fizz Buzz

Java

Note

Easy

416

Partition Equal Subset Sum

Java

Note

Medium

437

Path Sum III

Java

Note

Easy

438

Find All Anagrams in a String

Java

Note

Medium

448

Find All Numbers Disappeared in an Array

Java

Note

Easy

454

4Sum II

Java

Note

Medium

494

Target Sum

Java

Note

Medium

509

Fibonacci Number

Java

Note

Easy

543

Diameter of Binary Tree

Java

Note

Easy

560

Subarray Sum Equals K

Java

Note

Medium

567

Permutation in String

Java

Note

Medium

581

Shortest Unsorted Continuous Subarray

Java

Note

Easy

617

Merge Two Binary Trees

Java

Note

Easy

621

Task Scheduler

Java

Note

Medium

647

Palindromic Substrings

Java

Note

Medium

714

Best Time to Buy and Sell Stock with Transaction Fee

Java

Note

Medium

992

Subarrays with K Different Integers

Java

Note

Hard

leetcode's People

Contributors

diguage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

totodo alphahot

leetcode's Issues

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.