摘要:
原题链接在这里:https://leetcode.com/problems/string-compression/ 题目: Given an array of characters, compress it in-place. The length after compression must al 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/daily-temperatures/ 题目: Given a list of daily temperatures, produce a list that, for each day in the input, tell 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/friend-circles/description/ 题目: There are N students in a class. Some of them are friends, while some are not. T 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/lexicographical-numbers/description/ 题目: Given an integer n, return 1 - n in lexicographical order. For example, 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/ 题目: Your are given an array of integers prices, for which 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/kill-process/description/ 题目: Given n processes, each process has a unique PID (process id) and its PPID (parent 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/path-sum-iv/ 题目: If the depth of a tree is smaller than 5, then this tree can be represented by a list of three- 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/find-k-closest-elements/description/ 题目: Given a sorted array, two integers k and x, find the k closest elements 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/shuffle-an-array/ 题目: Shuffle a set of numbers without duplicates. Example: 题解: Shuffle时每个数字在小于它的方位内 swap 一次. j 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/number-of-distinct-islands/description/ 题目: Given a non-empty 2D array grid of 0's and 1's, an island is a group 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/find-largest-value-in-each-tree-row/description/ 题目: You need to find the largest value in each row of a binary 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/sparse-matrix-multiplication/description/ 题目: Given two sparse matrices A and B, return the result of AB. You ma 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/partition-to-k-equal-sum-subsets/description/ 题目: Given an array of integers nums and a positive integer k, find 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/max-stack/description/ 题目: Design a max stack that supports push, pop, top, peekMax and popMax. push(x) -- Push 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/nested-list-weight-sum-ii/description/ 题目: Given a nested list of integers, return the sum of all integers in th 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/encode-and-decode-tinyurl/ 题目: TinyURL is a URL shortening service where you enter a URL such as https://leetcod 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/replace-words/description/ 题目: In English, we have a concept called root, which can be followed by some other wo 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/valid-triangle-number/ 题目: Given an array consists of non-negative integers, your task is to count the number of 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/design-tinyurl/description/ 题目: How would you design a URL shortening service that is similar to TinyURL? Backgr 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/create-maximum-number/description/ 题目: Given two arrays of length m and n with digits 0-9 representing two numbe 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/maximum-swap/ 题目: Given a non-negative integer, you could swap two digits at most once to get the maximum valued 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/subarray-product-less-than-k/description/ 题目: Your are given an array of positive integers nums. Count and print 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/subarray-sum-equals-k/description/ 题目: Given an array of integers and an integer k, you need to find the total n 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/task-scheduler/description/ 题目: Given a char array representing tasks CPU need to do. It contains capital letter 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/max-area-of-island/ 题目: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representin 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/degree-of-an-array/description/ 题目: Given a non-empty array of non-negative integers nums, the degree of this ar 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/ipo/description/ 题目: Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Ve 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/rearrange-string-k-distance-apart/description/ 题目: Given a non-empty string s and an integer k, rearrange the st 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/design-twitter/description/ 题目: Design a simplified version of Twitter where users can post tweets, follow/unfol 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/split-array-into-consecutive-subsequences/description/ 题目: You are given an integer array sorted in ascending or 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/top-k-frequent-words/description/ 题目: Given a non-empty list of words, return the k most frequent elements. Your 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/next-greater-element-iii/description/ 题目: Given a positive 32-bit integer n, you need to find the smallest 32-bi 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/mini-parser/description/ 题目: Given a nested list of integers represented as a string, implement a parser to dese 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/delete-operation-for-two-strings/description/ 题目: Given two words word1 and word2, find the minimum number of st 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/complex-number-multiplication/description/ 题目: Given two strings representing two complex numbers. You need to r 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/optimal-division/description/ 题目: Given a list of positive integers, the adjacent integers will perform the floa 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/find-duplicate-file-in-system/description/ 题目: Given a list of directory info including directory path, and all 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/next-closest-time/ 题目: Given a time represented in the format "HH:MM", form the next closest time by reusing the 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/valid-parenthesis-string/description/ 题目: Given a string containing only three types of characters: '(', ')' and 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/add-bold-tag-in-string/description/ 题目: Given a string s and a list of strings dict, you need to add a closed pa 阅读全文