摘要: Description: Given an m x n matrix board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 阅读全文
posted @ 2021-03-25 14:40 summer_mimi 阅读(67) 评论(0) 推荐(0) 编辑
摘要: Description:Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to t 阅读全文
posted @ 2021-03-18 09:07 summer_mimi 阅读(34) 评论(0) 推荐(0) 编辑
摘要: Description: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in 阅读全文
posted @ 2021-03-17 22:13 summer_mimi 阅读(41) 评论(0) 推荐(0) 编辑
摘要: Description:Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: The left subtree 阅读全文
posted @ 2021-03-16 17:02 summer_mimi 阅读(48) 评论(0) 推荐(0) 编辑
摘要: Description: You are given the root of a binary search tree (BST), where exactly two nodes of the tree were swapped by mistake. Recover the tree witho 阅读全文
posted @ 2021-03-16 16:23 summer_mimi 阅读(51) 评论(0) 推荐(0) 编辑
摘要: Description: Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree. A heigh 阅读全文
posted @ 2021-03-15 15:06 summer_mimi 阅读(42) 评论(0) 推荐(0) 编辑
摘要: Description: Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traver 阅读全文
posted @ 2021-03-14 14:08 summer_mimi 阅读(43) 评论(0) 推荐(0) 编辑
摘要: Description: Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by lev 阅读全文
posted @ 2021-03-13 15:05 summer_mimi 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Description: Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path fr 阅读全文
posted @ 2021-03-12 19:37 summer_mimi 阅读(51) 评论(0) 推荐(0) 编辑
摘要: Description: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the 阅读全文
posted @ 2021-03-12 17:42 summer_mimi 阅读(42) 评论(0) 推荐(0) 编辑