摘要:
Given a data stream input of non-negative integers a1, a2, ..., an, ..., summarize the numbers seen so far as a list of disjoint intervals. For exampl 阅读全文
摘要:
Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar 阅读全文
摘要:
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe 阅读全文
摘要:
Given a tree (i.e. a connected, undirected graph that has no cycles) consisting of n nodes numbered from 0 to n - 1 and exactly n - 1 edges. The root 阅读全文
摘要:
Given numBottles full water bottles, you can exchange numExchange empty water bottles for one full water bottle. The operation of drinking a full wate 阅读全文
摘要:
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont 阅读全文
摘要:
In a country popular for train travel, you have planned some train travelling one year in advance. The days of the year that you will travel is given 阅读全文
摘要:
Given an array, strs, with strings consisting of only 0s and 1s. Also two integers m and n. Now your task is to find the maximum number of strings tha 阅读全文
摘要:
You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose o 阅读全文
摘要:
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total 阅读全文