摘要:
A string can be abbreviated by replacing any number of non-adjacent, non-empty substrings with their lengths. The lengths should not have leading zero 阅读全文
摘要:
You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a double booking. A double booking h 阅读全文
摘要:
A car travels from a starting position to a destination which is target miles east of the starting position. There are gas stations along the way. The 阅读全文
摘要:
A parentheses string is a non-empty string consisting only of '(' and ')'. It is valid if any of the following conditions is true: It is (). It can be 阅读全文
摘要:
In a linked list of size n, where n is even, the ith node (0-indexed) of the linked list is known as the twin of the (n-1-i)th node, if 0 <= i <= (n / 阅读全文
摘要:
Given a string s, find the longest palindromic subsequence's length in s. A subsequence is a sequence that can be derived from another sequence by del 阅读全文
摘要:
Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in 阅读全文
摘要:
Given a string S with only lowercase characters. Return the number of substrings that contains at least k distinct characters. Example 1: Input: S = " 阅读全文
摘要:
There is a row of n houses, where each house can be painted one of three colors: red, blue, or green. The cost of painting each house with a certain c 阅读全文
摘要:
Given an integer array nums and an integer k, return the length of the shortest non-empty subarray of nums with a sum of at least k. If there is no su 阅读全文
摘要:
Given an array of integers and an integer k, you need to find the minimum size of continuous no-empty subarrays whose sum equals to k, and return its 阅读全文
摘要:
Given two integers num and k, consider a set of positive integers with the following properties: The units digit of each integer is k. The sum of the 阅读全文
摘要:
Given a fixed-length integer array arr, duplicate each occurrence of zero, shifting the remaining elements to the right. Note that elements beyond the 阅读全文
摘要:
Given a string str and a dictionary dict, you need to find out which words in the dictionary are subsequences of the string and return those words.The 阅读全文
摘要:
There is a bookstore. In the next n days, customer[i] customers will arrive on the i-th day and leave at the end of that day. However, the bookstore o 阅读全文
摘要:
Winter is coming! During the contest, your first job is to design a standard heater with a fixed warm radius to warm all the houses. Every house can b 阅读全文
摘要:
Given n books and each book has the same number of pages. There are k persons to copy these books and the i-th person needs times[i] minutes to copy a 阅读全文
摘要:
Given n pieces of wood with length L[i] (integer array). Cut them into small pieces to guarantee you could have equal or more than k pieces with the s 阅读全文
摘要:
A sentence is a string of single-space separated words where each word can contain digits, lowercase letters, and the dollar sign '$'. A word represen 阅读全文
摘要:
You are given a 2D integer array stockPrices where stockPrices[i] = [dayi, pricei] indicates the price of the stock on day dayi is pricei. A line char 阅读全文