题目: Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie,…
分类:LeetCode题目解答
LeetCode 168 Excel Sheet Column Title
题目描述 Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example:…
[Leetcode] Maximal Square 最大正方形
Maximal Square Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containin…
78. Subsets
78. Subsets 题目 Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The …
[LeetCode] Array Nesting 数组嵌套
A zero-indexed array A consisting of N different integers is given. The array contains all integers in …
[LeetCode] Count Binary Substrings 统计二进制子字符串
Give a string s, count the number of non-empty (contiguous) substrings that have the same number o…
[LeetCode] Minimum Swaps To Make Sequences Increasing 使得序列递增的最小交换
We have two integer sequences A and B of the same non-zero length. We are allowed t…
[LeetCode] Largest BST Subtree 最大的二分搜索子树
Given a binary tree, find the largest subtree which is a Binary Search Tree (BST), where largest means …
[LeetCode] Add Strings 字符串相加
Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2. No…
[LeetCode] K-th Smallest Prime Fraction 第K小的质分数
A sorted list A contains 1, plus some number of primes. Then, for every p < q in the…
[Leetcode] Zigzag Iterator Z形迭代器
Zigzag Iterator Given two 1d vectors, implement an iterator to return their elements alternately. For example,…
【leetcode】96. Unique Binary Search Trees
1. 题目 Given n, how many structurally unique BST’s (binary search trees) that store values 1…n? For…