02 2017 档案
摘要:原题链接在这里:https://leetcode.com/problems/lfu-cache/ 题目: Design and implement a data structure for Least Frequently Used (LFU) cache. It should support th
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/flatten-nested-list-iterator/ 题目: Given a nested list of integers, implement an iterator to flatten it. Each ele
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/ 题目: RandomizedCollection is a data structure that contains a coll
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/insert-delete-getrandom-o1/?tab=Description 题目: Design a data structure that supports all following operations i
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/en/problem/coins-in-a-line-iii/ 题目: There are n coins in a line. Two players take turns to take a coin from one of the
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/en/problem/coins-in-a-line-ii/ 题目: There are n coins with different value in a line. Two players take turns to take on
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/en/problem/coins-in-a-line/ 题目: There are n coins in a line. Two players take turns to take one or two coins from righ
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/en/problem/maximum-subarray-ii/ 题目: Given an array of integers, find two non-overlapping subarrays which have the larg
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/en/problem/longest-increasing-continuous-subsequence-ii/ 题目: Give you an integer matrix (with row size n, column size
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/longest-increasing-subsequence/ 题目: Given an unsorted array of integers, find the length of longest increasing s
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/en/problem/longest-increasing-continuous-subsequence/ 题目: Give an integer array,find the longest increasing continuous
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ 题目: Given a string, find the length of the longest substri
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/zh-cn/problem/sliding-window-matrix-maximum/ 题目: Given an array of n * m matrix, and a moving matrix window (size k *
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/en/problem/heapify/ 题目: Given an integer array, heapify it into a min-heap array. For a heap array A, A[0] is the root
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/sliding-window-median/?tab=Description 题目: Median is the middle value in an ordered integer list. If the size of
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/trapping-rain-water-ii/?tab=Description 题目: Given an m x n matrix of positive integers representing the height o
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/en/problem/find-the-weak-connected-component-in-the-directed-graph/ 题目: Find the number Weak Connected Component in th
阅读全文
摘要:原题链接在这里:http://www.lintcode.com/en/problem/triangle-count/# 题目: Given an array of integers, how many three numbers can be found in the array, so that
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/sort-characters-by-frequency/ 题目: Given a string, sort it in decreasing order based on the frequency of characte
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/top-k-frequent-elements/ 题目: Given a non-empty array of integers, return the k most frequent elements. For examp
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/find-k-pairs-with-smallest-sums/ 题目: You are given two integer arrays nums1 and nums2 sorted in ascending order
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/ 题目: Given a n x n matrix where each of the rows and columns are sorted
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/construct-the-rectangle/ 题目: For a web developer, it is very important to know how to design a web page's size.
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/palindrome-pairs/ 题目: Given a list of unique words, find all pairs of distinct indices (i, j) in the given list,
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array/ 题目: Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤
阅读全文