Given a binary tree rooted at root, the depth of each node is the shortest distance to the root. A node is deepest if it has the largest depth possibl ...
分类:
其他好文 时间:
2020-02-06 11:07:31
阅读次数:
74
976. Largest Perimeter Triangle(三角形的最大周长) 链接 https://leetcode cn.com/problems/largest perimeter triangle 题目 给定由一些正数(代表长度)组成的数组 A,返回由其中三个长度组成的、面积不为零的三角 ...
分类:
其他好文 时间:
2020-02-05 11:29:30
阅读次数:
56
题目链接 https://leetcode-cn.com/problems/kth-largest-element-in-a-stream/ 题目内容 设计一个找到数据流中第K大元素的类(class)。注意是排序后的第K大元素,不是第K个不同的元素。你的 KthLargest 类需要一个同时接收整数 ...
分类:
编程语言 时间:
2020-02-05 09:31:29
阅读次数:
75
Given a 2D grid of 0s and 1s, return the number of elements in the largest square subgrid that has all 1s on its border, or 0 if such a subgrid doesn' ...
分类:
其他好文 时间:
2020-02-02 13:34:56
阅读次数:
73
"题目链接" Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a bl ...
分类:
其他好文 时间:
2020-02-01 12:47:27
阅读次数:
85
题目描述Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1... ...
分类:
其他好文 时间:
2020-02-01 12:30:58
阅读次数:
94
Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, you should return the largest palindro ...
分类:
编程语言 时间:
2020-02-01 10:47:36
阅读次数:
78
"题目" 题意:给你一个数组,让你把数组里的元素组合起来,组合成的新数字最大 题解:把数字给排个序,但是排序的标准是啥呢?两个数字孰大孰小呢?判断标准就是两个数字分别前后组合,得出的数字哪个大,则前面的那个数字就大。 一开始我的思路错了,根据数字每个位上的数字判断,这样反而是变得更加复杂了! ...
分类:
编程语言 时间:
2020-01-27 20:39:59
阅读次数:
62
法1:BFS #include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 100010; vector<int> temp ...
分类:
其他好文 时间:
2020-01-26 22:35:05
阅读次数:
88
A - Red and Black There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. ...
分类:
其他好文 时间:
2020-01-23 13:54:42
阅读次数:
86