Leetcode刷题方法以及题型整理插图

Leetcode刷题方法以及题型整理

今年又面了一波,集齐了FANMG的offer,发现刷题在找工作中的比重越来越低。这有多方面的原因,但是最大的因素是刷题对我来说已经不是那么的困难了。 回头看,刷题其实是一劳永逸的,熬过之后收获是持续性…

653. Two Sum IV – Input is a BST

653. Two Sum IV – Input is a BST

Given a Binary Search Tree and a target number, return true if there exist two elements in the BST s…

112. Path Sum

112. Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all…

110. Balanced Binary Tree

110. Balanced Binary Tree

Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary …

270. Closest Binary Search Tree Value

270. Closest Binary Search Tree Value

Given a non-empty binary search tree and a target value, find the value in the BST that is closest t…

100. Same Tree

100. Same Tree

Given two binary trees, write a function to check if they are equal or not. Two binary trees are con…

107. Binary Tree Level Order Traversal II

107. Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, fro…

257. Binary Tree Paths

257. Binary Tree Paths

Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 …

400. Nth Digit

400. Nth Digit

Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, … Note:…

645. Set Mismatch

645. Set Mismatch

The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of …

返回顶部