摘要:
Next Greater Element III (M) 题目 Given a positive integer n, find the smallest integer which has exactly the same digits existing in the integer n and 阅读全文
摘要:
Balanced Binary Tree (E) 题目 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a 阅读全文
摘要:
Smallest Range II (M) 题目 Given an array A of integers, for each integer A[i] we need to choose either x = -K or x = K, and add x to A[i] (only once). 阅读全文
摘要:
Decoded String at Index (M) 题目 An encoded string S is given. To find and write the decoded string to a tape, the encoded string is read one character 阅读全文
摘要:
Cherry Pickup II (H) 题目 Given a rows x cols matrix grid representing a field of cherries. Each cell in grid represents the number of cherries that you 阅读全文
摘要:
4Sum II (M) 题目 Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is ze 阅读全文
摘要:
Validate Binary Search Tree (M) 题目 Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The l 阅读全文
摘要:
Squares of a Sorted Array (E) 题目 Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in n 阅读全文
摘要:
Palindrome Partitioning (M) 题目 Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrom 阅读全文
摘要:
Smallest Subtree with all the Deepest Nodes (M) 题目 Given the root of a binary tree, the depth of each node is the shortest distance to the root. Retur 阅读全文