Fork me on GitHub

LeetCode OJ

正在刷 LeetCode OJ,所有的题解都是使用 Swift 语言进行编写。
我在 GitHub 上面同步建立了 Project LeetCode.swift,欢迎 Star 🎉🎉🎉

标签简写说明

  • A : Array
  • DP : Dynamic Programming
  • Str : String
  • M : Math
  • T : Tree
  • HT : Hash Table
  • DS : Depth-first Search
  • BS : Binary Search
  • TP : Two Pointers
  • B : Backtracking
  • LL : Linked List
  • D&C : Divide and Conquer
  • H : Heap
  • S : Sort

题解

# Title Solution Difficulty Tags Blog
1 Two Sum Solution A HT 题解
2 Add Two Numbers Solution LL M 题解
3 Longest Substring Without Repeating Characters Solution HT TP Str 题解
4 Median of Two Sorted Arrays Solution A BS D&C -
12 Integer to Roman Solution M A 题解
13 Roman to Integer Solution M A 题解
21 Merge Two Sorted Lists Solution LL 题解
28 Implement strStr() Solution TP Str 题解
53 Maximum Subarray Solution A D&C DP 题解
66 Plus One Solution A M 题解
108 Convert Sorted Array to Binary Search Tree Solution T DS 题解
139 Word Break Solution DP 题解
140 Word Break II Solution DP B 题解
164 Maximum Gap Solution S 题解
206 Reverse Linked List Solution LL 题解
283 Move Zeroes Solution A TP 题解
373 Find K Pairs with Smallest Sums Solution H 题解
628 Maximum Product of Three Numbers Solution A M 题解