Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1 4 5, 1 3 4, 2 6 ] Output: 1 1 2 ...
分类:
其他好文 时间:
2018-10-14 13:51:48
阅读次数:
153
Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: Input: [1,1,2] Output: [ [1,1,2], [1,2, ...
分类:
其他好文 时间:
2018-10-14 13:49:43
阅读次数:
173
题目 Given an integer, write a function to determine if it is a power of two. Example 1: Input: 1 Output: true Explanation: 20 = 1 Example 2: Input: 16 ...
分类:
其他好文 时间:
2018-10-14 13:49:06
阅读次数:
197
题目 Count the number of prime numbers less than a non negative number, n. Example: Input: 10 Output: 4 Explanation: There are 4 prime numbers less than ...
分类:
其他好文 时间:
2018-10-12 13:54:06
阅读次数:
120
编码规范: 项目名采用Pascal命名法,每个单词的首字母是大写 变量名采用Camel(骆驼)命名法,首字母是小写,其后每个单词的首字母是大写 #include <stdio.h>//standard Input and Output标准输入输出 int main(int argc,char *ar ...
分类:
编程语言 时间:
2018-10-11 14:28:11
阅读次数:
183
点分治【bzoj1468】 Tree Description 给你一棵TREE,以及这棵树上边的距离.问有多少对点它们两者间的距离小于等于K Input N(n Output 一行,有多少对点之间的距离小于等于k 点分治开始入门。 点分治,主要是解决形如:给你一棵树,求树上满足XX条件的点对的对数。 ...
分类:
其他好文 时间:
2018-10-10 17:52:45
阅读次数:
195
Invert a binary tree. Example: Input: Output: ...
分类:
其他好文 时间:
2018-10-10 14:32:45
阅读次数:
113
Given an integer, write a function to determine if it is a power of three. Example 1: Input: 27 Output: true Example 2: Input: 0 Output: false Example ...
分类:
其他好文 时间:
2018-10-08 21:39:23
阅读次数:
154
D. Petya and Array time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petya has an array aa ...
分类:
编程语言 时间:
2018-10-08 15:03:00
阅读次数:
156
Nature Reserve time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Problem Description There ...
分类:
其他好文 时间:
2018-10-08 00:35:29
阅读次数:
188