Given a collection of intervals, merge all overlapping intervals. Example 1: Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explan ...
分类:
其他好文 时间:
2020-02-17 22:31:56
阅读次数:
92
对于给定的一个字符串,统计其中数字字符出现的次数。 Input输入数据有多行,第一行是一个整数n,表示测试实例的个数,后面跟着n行,每行包括一个由字母和数字组成的字符串。 Output对于每个测试实例,输出该串中数值的个数,每个输出占一行。Sample Input 2 asdfasdf123123a ...
分类:
其他好文 时间:
2020-02-16 01:22:19
阅读次数:
131
螺旋矩阵二。题意是给一个数字n,请输出一个n x n的矩阵,被从1到n方这n方个数字填满。填满的方式同54题。例子, Example: Input: 3 Output: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] 这个题跟54题做法几乎一样。也是要通过找到ro ...
分类:
其他好文 时间:
2020-02-14 10:54:23
阅读次数:
53
矩阵赋零。题意是给一个二维矩阵,如果其中有任何一个元素为0,请将0所在的行和列全都赋值为0。要求in-place做。例子, Example 1: Input: [ [1,1,1], [1,0,1], [1,1,1] ] Output: [ [1,0,1], [0,0,0], [1,0,1] ] Ex ...
分类:
其他好文 时间:
2020-02-14 10:51:07
阅读次数:
57
爬楼梯。题意是给一个数字n代表楼梯的高度,你可以每次爬一步或者两步,求有多少种不同的爬法。例子, Example 1: Input: 2 Output: 2 Explanation: There are two ways to climb to the top. 1. 1 step + 1 step ...
分类:
其他好文 时间:
2020-02-13 09:56:32
阅读次数:
70
C. Make Good time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Let's call an array a1,a2,… ...
分类:
其他好文 时间:
2020-02-12 00:35:24
阅读次数:
75
E. Little Artem and Time Machine time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Little ...
分类:
其他好文 时间:
2020-02-11 09:42:48
阅读次数:
71
D. Aerodynamic time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Guy-Manuel and Thomas are ...
分类:
其他好文 时间:
2020-02-10 11:33:03
阅读次数:
53
Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1. Example 1: Input: 123 Output: " ...
分类:
其他好文 时间:
2020-02-10 10:16:33
阅读次数:
75
Description Input and Output Codes描述#1128 : 二分·二分查找DescriptionNettle最近在玩《艦これ》,因此Nettle收集了很多很多的船(这里我们假设Nettle氪了很多金,开了无数个船位)。去除掉重复的船之后,还剩下N(1≤N≤1,000,00... ...
分类:
其他好文 时间:
2020-02-08 13:58:07
阅读次数:
71