摘要:
You are assigned to put some amount of boxes onto one truck. You are given a 2D array boxTypes, where boxTypes[i] = [numberOfBoxesi, numberOfUnitsPerB 阅读全文
摘要:
You are given an integer array nums and an integer k. In one operation, you can pick two numbers from the array whose sum equals k and remove them fro 阅读全文
摘要:
Given an array of positive integers target and an array initial of same size with all zeros. Return the minimum number of operations to form a target 阅读全文
摘要:
Given two binary trees original and cloned and given a reference to a node target in the original tree. The cloned tree is a copy of the original tree 阅读全文
摘要:
You are given an integer array nums with no duplicates. A maximum binary tree can be built recursively from nums using the following algorithm: Create 阅读全文
摘要:
You are given an array of distinct integers arr and an array of integer arrays pieces, where the integers in pieces are distinct. Your goal is to form 阅读全文
摘要:
You are standing at position 0 on an infinite number line. There is a goal at position target. On each move, you can either go left or right. During t 阅读全文
摘要:
Given a binary tree where node values are digits from 1 to 9. A path in the binary tree is said to be pseudo-palindromic if at least one permutation o 阅读全文
摘要:
Implement the class ProductOfNumbers that supports two methods: 1. add(int num) Adds the number num to the back of the current list of numbers. 2. get 阅读全文
摘要:
You have a graph of n nodes labeled from 0 to n - 1. You are given an integer n and a list of edges where edges[i] = [ai, bi] indicates that there is 阅读全文
摘要:
You have a graph of n nodes. You are given an integer n and an array edges where edges[i] = [ai, bi] indicates that there is an edge between ai and bi 阅读全文
摘要:
You are given two arrays rowSum and colSum of non-negative integers where rowSum[i] is the sum of the elements in the ith row and colSum[j] is the sum 阅读全文
摘要:
Given the following details of a matrix with n columns and 2 rows : The matrix is a binary matrix, which means each element in the matrix can be 0 or 阅读全文
摘要:
Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
摘要:
Given a string s consisting only of characters a, b and c. Return the number of substrings containing at least one occurrence of all these characters 阅读全文
摘要:
A valid parentheses string is either empty "", "(" + A + ")", or A + B, where A and B are valid parentheses strings, and + represents string concatena 阅读全文
摘要:
Given an array of integers nums, you start with an initial positive value startValue. In each iteration, you calculate the step by step sum of startVa 阅读全文
摘要:
Given the root of a binary tree and a node u in the tree, return the nearest node on the same level that is to the right of u, or return null if u is 阅读全文
摘要:
An encoded string S is given. To find and write the decoded string to a tape, the encoded string is read one character at a time and the following ste 阅读全文
摘要:
You are given an m x n binary matrix grid, where 0 represents a sea cell and 1 represents a land cell. A move consists of walking from one land cell t 阅读全文