摘要:
Your music player contains N different songs and she wants to listen to L (not necessarily different) songs during your trip. You create a playlist so 阅读全文
摘要:
Given the head of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0 until there are no such sequences. After doing so, 阅读全文
摘要:
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = 阅读全文
摘要:
There are N wines in a row. Each year you sell either the leftmost or the rightmost wine. The i-th wine has initial price p[i] and price k * p[i] in t 阅读全文
摘要:
In an infinite chess board with coordinates from -infinity to +infinity, you have a knight at square [0, 0]. A knight has 8 possible moves it can make 阅读全文
摘要:
You have N stones in a row, and would like to create from them a pyramid. This pyramid should be constructed such that the height of each stone increa 阅读全文
摘要:
A competitive runner would like to create a route that starts and ends at his house, with the condition that the route goes entirely uphill at first, 阅读全文
摘要:
Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one element deletion. In other words, y 阅读全文
摘要:
On a mysterious island there are creatures known as Quxes which come in three colors: red, green, and blue. One power of the Qux is that if two of the 阅读全文
摘要:
Given a string s, we make queries on substrings of s. For each query queries[i] = [left, right, k], we may rearrange the substring s[left], ..., s[rig 阅读全文