Skip to content

本页整理了我曾经用python刷过的Leetcode

Two Sum

Add Two Numbers

Longest Substring Without Repeating Characters

Longest Palindromic Substring

ZigZag Conversion

Reverse Integer

String to Integer (atoi)

Palindrome Number

Container With Most Water

Integer to Roman

Longest Common Prefix

3Sum

3Sum Closest

Letter Combinations of a Phone Number

4Sum

Remove Nth Node From End of List

Valid Parentheses

Merge Two Sorted Lists

Generate Parentheses

Merge k Sorted Lists

Swap Nodes in Pairs

Remove Duplicates from Sorted Array

Remove Element

Implement strStr()

Next Permutation

Search in Rotated Sorted Array

Find First and Last Position of Element in Sorted Array

Search Insert Position

Valid Sudoku

Count and Say

Multiply Strings

Permutations

Permutations II

Rotate Image

Maximum Subarray

Jump Game

Length of Last Word

Spiral Matrix II

Permutation Sequence

Rotate List

Unique Paths

Minimum Path Sum

Plus One

Add Binary

Sqrt(x)

Climbing Stairs

Simplify Path

Search a 2D Matrix

Combinations

Subsets

Remove Duplicates from Sorted Array II

Remove Duplicates from Sorted List

Merge Sorted Array

Subsets II

Reverse Linked List II

Restore IP Addresses

Binary Tree Inorder Traversal

Validate Binary Search Tree

Same Tree

Symmetric Tree

Binary Tree Level Order Traversal

Binary Tree Zigzag Level Order Traversal

Construct Binary Tree from Preorder and Inorder Traversal

Minimum Depth of Binary Tree

Path Sum

Path Sum II

Pascal's Triangle II

Triangle

Sum Root to Leaf Numbers

Surrounded Regions

Palindrome Partitioning

Single Number

Binary Tree Preorder Traversal

Sort List

Min Stack

Two Sum II - Input array is sorted

Excel Sheet Column Number

Factorial Trailing Zeroes

Number of 1 Bits

Number of Islands

Bitwise AND of Numbers Range

Remove Linked List Elements

Isomorphic Strings

Reverse Linked List

Add and Search Word - Data structure design

Contains Duplicate

Count Complete Tree Nodes

Implement Stack using Queues

Invert Binary Tree

Power of Two

Implement Queue using Stacks

Palindrome Linked List

Lowest Common Ancestor of a Binary Search Tree

Search a 2D Matrix II

Valid Anagram

Binary Tree Paths

Add Digits

Missing Number

First Bad Version

Move Zeroes

Word Pattern

Nim Game

Longest Increasing Subsequence

Range Sum Query - Immutable

Coin Change

Flatten Nested List Iterator

Power of Four

Reverse String

Intersection of Two Arrays II

Super Pow

Ransom Note

Lexicographical Numbers

First Unique Character in a String

Remove K Digits

Number of Segments in a String

Arranging Coins

Hamming Distance

Total Hamming Distance

Keyboard Row

Find Mode in Binary Search Tree

Base 7

Find Bottom Left Tree Value

Find Largest Value in Each Tree Row

Detect Capital

Reverse String II

Student Attendance Record I

Subarray Sum Equals K

Array Partition I

Binary Tree Tilt

Permutation in String

Subtree of Another Tree

Shortest Unsorted Continuous Subarray

Valid Triangle Number

Merge Two Binary Trees

Sum of Square Numbers

Maximum Average Subarray I

Second Minimum Node In a Binary Tree

Longest Continuous Increasing Subsequence

Binary Number with Alternating Bits

Search in a Binary Search Tree

Jewels and Stones

Letter Case Permutation

Minimum Swaps To Make Sequences Increasing

Shortest Distance to a Character

Backspace String Compare

Transpose Matrix

Uncommon Words from Two Sentences

Monotonic Array

Increasing Order Search Tree

X of a Kind in a Deck of Cards

Sort Array By Parity II

Unique Email Addresses

DI String Match

Last updated: