You need to find the largest value in each row of a binary tree. Example: Input: 1 / \ 3 2 / \ \ 5 3 9 Output: [1, 3, 9] class Solution { public List< ...
分类:
其他好文 时间:
2020-01-23 11:01:57
阅读次数:
57
leetcode 976 给定由一些正数(代表长度)组成的数组 A,返回由其中三个长度组成的、面积不为零的三角形的最大周长。 如果不能形成任何面积不为零的三角形,返回 0。 1 impl Solution { 2 pub fn largest_perimeter(a: Vec<i32>) -> i3 ...
分类:
其他好文 时间:
2020-01-19 19:36:11
阅读次数:
123
比较像$2^{11}$和$3^7$这样用指数形式表示的数并不困难,因为任何计算器都可以确认: $$ 2^{11}=2048 $$ 然而,确认$632382^{518601} 519432^{525806}$就要困难得多,因为两个数都包含三百万位数。文本文件 "base_exp.txt" 中包含一千行 ...
分类:
其他好文 时间:
2020-01-15 19:36:36
阅读次数:
55
https://leetcode-cn.com/problems/kth-largest-element-in-an-array/ ...
分类:
编程语言 时间:
2020-01-07 13:18:53
阅读次数:
89
这道题思路很简单,就是在一个loop下找最大的和第二大的数值。记住,python最小的数值是-sys.maxsize-1 ...
分类:
其他好文 时间:
2020-01-06 09:48:25
阅读次数:
66
select a.tablespace_name,a.bytes bytes_used,b.largest,round(((a.bytes - b.bytes)/a.bytes)*100,2) percent_used from (select tablespace_name,sum(bytes) ...
分类:
数据库 时间:
2020-01-05 00:17:23
阅读次数:
104
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example ...
分类:
其他好文 时间:
2020-01-03 21:27:13
阅读次数:
104
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example: Input: 1 0 1 0 0 1 0 1 1 1 ...
分类:
其他好文 时间:
2019-12-27 13:47:34
阅读次数:
76
链接: https://codeforces.com/contest/1281/problem/D 题意: You are an all powerful being and you have created a rectangular world. In fact, your world is s ...
分类:
其他好文 时间:
2019-12-26 22:49:40
阅读次数:
173
Description Given a board which is a 2D matrix includes a-z and dictionary dict, find the largest collection of words on the board, the words can not ...
分类:
其他好文 时间:
2019-12-22 00:39:36
阅读次数:
70