Android Open Source Project Patches

注: 以下链接均要翻墙 1.Optimize code on get UidDetail in AppDataUsage 链接:

2017-10-29 15:02:01

阅读数 910

评论数 0

LeetCode 503 Next Greater Element II (数组)

Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The...

2019-05-15 19:27:33

阅读数 10

评论数 0

LeetCode 685 Redundant Connection II (并查集 判树)

In this problem, a rooted tree is adirectedgraph such that, there is exactly one node (the root) for which all other nodes are descendants of this no...

2019-05-14 23:51:28

阅读数 5

评论数 0

LeetCode 778 Swim in Rising Water (二分 + DFS)

On an N x Ngrid, each squaregrid[i][j]represents the elevation at that point(i,j). Now rain starts to fall. At timet, the depth of the water everywh...

2019-05-14 22:56:18

阅读数 8

评论数 0

Codeforces B Cat Party (思维 推荐)

B2. Cat Party (Hard Edition) time limit per test:1 second memory limit per test:256 megabytes This problem is same as the previous one, but has ...

2019-05-13 20:04:32

阅读数 26

评论数 0

LeetCode 873 Length of Longest Fibonacci Subsequence (hash 或 dp)

A sequenceX_1, X_2, ..., X_nisfibonacci-likeif: n >= 3 X_i + X_{i+1} = X_{i+2}for alli + 2 <= n Given astrictly increasingarrayAof po...

2019-05-06 20:04:50

阅读数 14

评论数 0

LeetCode 740 Delete and Earn (dp)

Given an arraynumsof integers, you can perform operations on the array. In each operation, you pick anynums[i]and delete it to earnnums[i]points. Af...

2019-05-05 11:10:47

阅读数 13

评论数 0

LeetCode 1025 Divisor Game (博弈)

Alice and Bob take turns playing a game, with Alice starting first. Initially, there is a numberNon the chalkboard. On each player's turn, that play...

2019-05-05 11:01:52

阅读数 29

评论数 0

LeetCode 63 Unique Paths II (dp)

A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below). The robot can only move either down or right at any poi...

2019-05-05 10:51:19

阅读数 11

评论数 0

LeetCode 91 Decode Ways (dp)

A message containing letters fromA-Zis being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 ...

2019-05-05 10:29:52

阅读数 93

评论数 0

LeetCode 442 Find All Duplicates in an Array (思维)

Given an array of integers, 1 ≤ a[i] ≤n(n= size of array), some elements appeartwiceand others appearonce. Find all the elements that appeartwicein ...

2019-05-02 11:49:57

阅读数 13

评论数 0

Codeforces 607B Zuma (区间dp)

B. Zuma time limit per test:2 seconds memory limit per test:512 megabytes Genos recently installed the game Zuma on his phone. In Zuma there exist...

2019-05-02 11:25:10

阅读数 12

评论数 0

LeetCode 650 2 Keys Keyboard (dp 推荐)

Initially on a notepad only one character 'A' is present. You can perform two operations on this notepad for each step: Copy All: You can copy all t...

2019-04-29 02:24:49

阅读数 17

评论数 0

LeetCode 114 Flatten Binary Tree to Linked List (DFS 分治)

Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 1 / \ 2 5 / \ \ 3 4 6 The fl...

2019-04-28 23:04:50

阅读数 10

评论数 0

LeetCode 554 Brick Wall (前缀和)

There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but different width. Y...

2019-04-28 22:00:33

阅读数 315

评论数 0

LeetCode 230 Kth Smallest Element in a BST (中序遍历)

Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's ...

2019-04-28 13:18:51

阅读数 14

评论数 0

LeetCode 552 Student Attendance Record II (dp)

Given a positive integern, return the number of all possible attendance records with length n, which will be regarded as rewardable. The answer may b...

2019-04-27 22:47:44

阅读数 11

评论数 0

LeetCode 739 Daily Temperatures (思维)

Given a list of daily temperaturesT, return a list such that, for each day in the input, tells you how many days you would have to wait until a warme...

2019-04-27 15:16:31

阅读数 32

评论数 0

LeetCode 20 Valid Parentheses (栈)

Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid. An input string is valid if: Open b...

2019-04-27 14:52:59

阅读数 6

评论数 0

LeetCode 53 Maximum Subarray (dp)

Given an integer arraynums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum. Example: In...

2019-04-27 14:41:07

阅读数 15

评论数 0

取消 删除