Skip to content

Files

Latest commit

0078344 · Dec 21, 2020

History

History

LeetCode-cn

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 2, 2020
Dec 21, 2020
Dec 21, 2020

LeetCode

This project uses the Swift language to solve questions on LeetCode-cn and records the solution and the answer.

Prerequisites

This project uses Xcode Playground to organize code files.

  • Compiled with Xcode 10 and above.
  • Swift 5.0 and above.

Directory

This section will list the questions that have been solved in this project.

Array

# Title Difficulty
914 X of a Kind in a Deck of Cards Easy
941 Valid Mountain Array Easy
999 Available Captures forRook Easy
1365 How Many Numbers Are Smaller Easy
289 Game of Life Medium
912 Sort an Array Medium
5381 Queries on a Permutation With Key Medium
mst-01.07 Rotate Matrix LCCI Medium
57 Insert Interval Hard

Binary Search

# Title Difficulty
278 First Bad Version Easy
34 Find First and Last Position of Element in Sorted Array Medium

Breadth First Search

# Title Difficulty
127 Word Ladder Medium
1162 As Far from Land as Possible Medium

Dynamic Programming

# Title Difficulty
mst-17.16 The Masseuse LCCI Easy

HashTable

# Title Difficulty
1207 Unique Number of Occurrences Easy
463 Island Perimeter Easy

Greedy

# Title Difficulty
55 Jump Game Medium
134 Gas Station Medium
1111 Maximum Nesting Depth of Two Valid Parentheses Strings Medium
5195 Longest Happy String Medium

Linked List

# Title Difficulty
876 Middle of the Linked List Easy
2 Add Two Numbers Medium

Math

# Title Difficulty
67 Add Binary Easy
892 Surface Area of 3D Shapes Easy

Stack

# Title Difficulty
232 Implement Queue using Stacks Easy
mst-03.02 Min Stack LCCI Easy
496 Validate Stack Sequences Medium
42 Trapping Rain Water Hard

String

# Title Difficulty
5380 String Matching in an Array Easy
22 Generate Parentheses Medium
151 Reverse Words in a String Medium
5382 HTML Entity Parser Medium

Tree

# Title Difficulty
104 Maximum Depth of Binary Tree Easy
110 Balanced Binary Tree Easy
226 Invert Binary Tree Easy
94 Binary Tree Inorder Traversal Medium
129 Sum Root to Leaf Numbers Medium
144 Binary Tree Preorder Traversal Medium
236 Lowest Common Ancestor of a Binary Tree Medium
654 Maximum Binary Tree Medium

Trie

# Title Difficulty
820 Short Encoding of Words Medium

Two Pointers

# Title Difficulty
349 Intersection of Two Arrays Easy