# LeetCode 刷题记录: 101. Symmetric Tree [Python]

## 原题

https://leetcode.com/problems/symmetric-tree/

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).

# LeetCode 刷题记录: 84. Largest Rectangle in Histogram [Python]

## 原题

https://leetcode.com/problems/largest-rectangle-in-histogram/

Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.

# LeetCode 刷题记录: 85. Maximal Rectangle [Python]

## 原题

https://leetcode.com/problems/maximal-rectangle/

Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area.

# LeetCode 刷题记录: 96. Unique Binary Search Trees [Python]

## 原题

https://leetcode.com/problems/unique-binary-search-trees/

Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n?

# LeetCode 刷题记录: 98. Validate Binary Search Tree [Python]

## 原题

https://leetcode.com/problems/validate-binary-search-tree/

Given a binary tree, determine if it is a valid binary search tree (BST).

# LeetCode 刷题记录: 79. Word Search [Python]

## 原题

https://leetcode.com/problems/word-search/

Given a 2D board and a word, find if the word exists in the grid.

The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once.

DFS。四个方向搜寻即可。

# LeetCode 刷题记录: 56. Merge Intervals [Python]

## 原题

https://leetcode.com/problems/merge-intervals/

Given a collection of intervals, merge all overlapping intervals.

# LeetCode 刷题记录: 48. Rotate Image [Python]

## 原题

https://leetcode.com/problems/rotate-image/

You are given an n x n 2D matrix representing an image.

Rotate the image by 90 degrees (clockwise).

You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.

# LeetCode 刷题记录: 55. Jump Game [Python]

## 原题

https://leetcode.com/problems/jump-game/

Given an array of non-negative integers, you are initially positioned at the first index of the array.

Each element in the array represents your maximum jump length at that position.

Determine if you are able to reach the last index.

# LeetCode 刷题记录: 46. Permutations [Python]

## 原题

https://leetcode.com/problems/permutations/

Given a collection of distinct integers, return all possible permutations.

## 思路

Backtrack。当temp长度等于所有数字时，添加进结果。否则遍历数字，每个数字添加进temp中，进行下一次迭代。当temp中存在相同数字时跳过。