·
·
文章目录
  1. LeetCode OJ
  2. 标签简写说明
  3. 题解

LeetCode OJ

LeetCode OJ

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

标签简写说明

  • A : Array
  • DP : Dynamic Programming
  • Str : String
  • M : Math
  • T : Tree
  • HT : Hash Table
  • DFS : Depth-first Search
  • BFS : Breadth-first Search
  • BS : Binary Search
  • TP : Two Pointers
  • B : Backtracking
  • LL : Linked List
  • D&C : Divide and Conquer
  • H : Heap
  • S : Sort
  • G : Greedy
  • BM : Bit Manipulation
  • St : Stack
  • Q : Queue
  • D : Design

题解

# 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 题解
14 Longest Common Prefix Solution Str 题解
19 Remove Nth Node From End of List Solution LL TP 题解
20 Valid Parentheses Solution St Str 题解
21 Merge Two Sorted Lists Solution LL 题解
26 Remove Duplicates from Sorted Array Solution A TP 题解
27 Remove Element Solution A TP 题解
28 Implement strStr() Solution TP Str 题解
53 Maximum Subarray Solution A D&C DP 题解
54 Spiral Matrix Solution A 题解
61 Rotate List Solution LL TP 题解
66 Plus One Solution A M 题解
67 Add Binary Solution Str M 题解
108 Convert Sorted Array to Binary Search Tree Solution T DS 题解
118 Pascal’s Triangle Solution A 题解
119 Pascal’s Triangle II Solution A 题解
138 Copy List with Random Pointer Solution HT LL 题解
139 Word Break Solution DP 题解
140 Word Break II Solution DP B 题解
141 Linked List Cycle Solution LL TP 题解
142 Linked List Cycle II Solution LL TP 题解
150 Evaluate Reverse Polish Notation Solution St 题解
151 Reverse Words in a String Solution Str 题解
155 Min Stack Solution St D 题解
160 Intersection of Two Linked Lists Solution LL 题解
164 Maximum Gap Solution S 题解
167 Two Sum II - Input array is sorted Solution A TP BS 题解
189 Rotate Array Solution A 题解
203 Remove Linked List Elements Solution LL 题解
206 Reverse Linked List Solution LL 题解
209 Minimum Size Subarray Sum Solution A TP BS 题解
225 Implement Stack using Queues Solution St D 题解
232 Implement Queue using Stacks Solution St D 题解
234 Palindrome Linked List Solution LL TP 题解
283 Move Zeroes Solution A TP 题解
328 Odd Even Linked List Solution LL 题解
344 Reverse String Solution Str TP 题解
346 Moving Average from Data Stream Solution Q 题解
373 Find K Pairs with Smallest Sums Solution H 题解
394 Decode String Solution St DFS 题解
404 Sum of Left Leaves Solution T 题解
455 Assign Cookies Solution G 题解
461 Hamming Distance Solution BM 题解
485 Max Consecutive Ones Solution A 题解
498 Diagonal Traverse Solution A 题解
557 Reverse Words in a String III Solution Str 题解
561 Array Partition I Solution A 题解
566 Reshape the Matrix Solution A 题解
628 Maximum Product of Three Numbers Solution A M 题解
657 Robot Return to Origin Solution Str 题解
707 Design Linked List Solution M LL 题解
724 Find Pivot Index Solution A 题解
739 Daily Temperatures Solution St HT 题解
747 Largest Number At Least Twice of Others Solution A 题解
支持一下
扫一扫,支持yeziahehe
  • 微信扫一扫
  • 支付宝扫一扫