- 博客(19)
- 收藏
- 关注
原创 [Leetcode] 482. License Key Formatting 解题报告
题目:You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups by N dashes.Given a number K, we would
2018-04-11 17:08:09 257
原创 [Leetcode] 815. Bus Routes 解题报告
题目:We have a list of bus routes. Each routes[i] is a bus route that the i-th bus repeats forever. For example if routes[0] = [1, 5, 7], this means that the first bus (0-th indexed) travels i
2018-04-11 16:13:20 1887
原创 [Leetcode] 814. Binary Tree Pruning 解题报告
题目:We are given the head node root of a binary tree, where additionally every node's value is either a 0 or a 1.Return the same tree where every subtree (of the given tree) not containing
2018-04-11 14:53:06 360
原创 [Leetcode] 813. Largest Sum of Averages 解题报告
题目:We partition a row of numbers A into at most K adjacent (non-empty) groups, then our score is the sum of the average of each group. What is the largest score we can achieve?Note that ou
2018-04-11 14:24:22 1286
原创 [Leetcode] 812. Largest Triangle Area 解题报告
题目:You have a list of points in the plane. Return the area of the largest triangle that can be formed by any 3 of the points.Example:Input: points = [[0,0],[0,1],[1,0],[0,2],[2,0]]Output: 2
2018-04-09 11:00:26 1601
原创 [Leetcode] 811. Subdomain Visit Count 解题报告
题目:A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "leetcode.com", and at the lowest level, "discuss.leet
2018-04-09 10:37:03 306
原创 [Leetcode] 810. Chalkboard XOR Game 解题报告
题目:We are given non-negative integers nums[i] which are written on a chalkboard. Alice and Bob take turns erasing exactly one number from the chalkboard, with Alice starting first. If erasing
2018-04-09 10:14:58 485
原创 [Leetcode] 809. Expressive Words 解题报告
题目:Sometimes people repeat letters to represent extra feeling, such as "hello" -> "heeellooo", "hi" -> "hiiii". Here, we have groups, of adjacent letters that are all the same character, and ad
2018-04-09 09:45:31 874
原创 [Leetcode] 808. Soup Servings 解题报告
题目:There are two types of soup: type A and type B. Initially we have N ml of each type of soup. There are four kinds of operations:Serve 100 ml of soup A and 0 ml of soup BServe 75 ml of s
2018-04-09 09:10:56 1267
原创 [Leetcode] 807. Max Increase to Keep City Skyline 解题报告
题目:In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowed to increase the height of any number of buildings, by any amount (the
2018-04-08 11:29:09 343
原创 [Leetcode] 806. Number of Lines To Write String 解题报告
题目:We are to write the letters of a given string S, from left to right into lines. Each line has maximum width 100 units, and if writing a letter would cause the width of the line to exceed 10
2018-04-08 11:05:20 368
原创 [Leetcode] 805. Split Array With Same Average 解题报告
题目:In a given integer array A, we must move every element of A to either list B or list C. (B and C initially start empty.)Return true if and only if after such a move, it is possible that t
2018-04-08 10:54:39 2780
原创 [Leetcode] 804. Unique Morse Code Words 解题报告
题目:International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a"maps to ".-", "b" maps to "-...", "c" maps to "-.-.", and
2018-04-06 10:00:46 341
原创 [Leetcode] 803. Bricks Falling When Hit 解题报告
题目:We have a grid of 1s and 0s; the 1s in a cell represent bricks. A brick will not drop if and only if it is directly connected to the top of the grid, or at least one of its (4-way) adjacent
2018-04-06 09:49:54 1642
原创 [Leetcode] 802. Find Eventual Safe States 解题报告
题目:代码:In a directed graph, we start at some node and every turn, walk along a directed edge of the graph. If we reach a node that is terminal (that is, it has no outgoing directed edges), we
2018-04-05 18:02:05 671
原创 [Leetcode] 801. Minimum Swaps To Make Sequences Increasing 解题报告
题目:We have two integer sequences A and B of the same non-zero length.We are allowed to swap elements A[i] and B[i]. Note that both elements are in the same index position in their respe
2018-04-05 15:41:17 1606
原创 [Leetcode] 800. Similar RGB Color 解题报告
题目:In the following, every capital letter represents some hexadecimal digit from 0 to f.The red-green-blue color "#AABBCC" can be written as "#ABC" in shorthand. For example, "#15c" is sh
2018-04-05 13:12:20 1520
原创 [Leetcode] 799. Champagne Tower 解题报告
题目:We stack glasses in a pyramid, where the first row has 1 glass, the second row has 2 glasses, and so on until the 100th row. Each glass holds one cup (250ml) of champagne.Then, some cham
2018-04-05 12:29:31 413
原创 [Leetcode] 798. Smallest Rotation with Highest Score 解题报告
题目:Given an array A, we may rotate it by a non-negative integer K so that the array becomes A[K], A[K+1], A{K+2], ... A[A.length - 1], A[0], A[1], ..., A[K-1]. Afterward, any entries that a
2018-04-01 09:53:12 1046
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人