template是一个泛化的:使用template时开始仅仅是声明,具体的例如:k<int> a;叫做实例化显式实例化:类似k<int>a;明确指出哪种类型;隐式实例化:类似k<>a;没有说明类型,有编译器自动匹配特化:(个人认为就是自己制定template 中T的作用) 操作符重载: 复习stl: ...
分类:
其他好文 时间:
2018-02-18 17:43:32
阅读次数:
194
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. There are two ways, first use ArrayList to rewrite ...
分类:
其他好文 时间:
2018-02-18 10:32:17
阅读次数:
132
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that nums1 has enough space (size th ...
分类:
其他好文 时间:
2018-02-16 23:50:56
阅读次数:
334
题目链接Merge Intervals /** * Definition for an interval. * public class Interval { * int start; * int end; * Interval() { start = 0; end = 0; } * Interva ...
分类:
编程语言 时间:
2018-02-16 15:19:06
阅读次数:
210
[抄题]: 给出若干闭合区间,合并所有重叠的部分。 给出的区间列表 => 合并后的区间列表: [暴力解法]: 时间分析: 空间分析: [思维问题]: [一句话思路]: 区间类问题,先把起点排序才能具有逐个合并的能力和性质 [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况(不合 ...
分类:
其他好文 时间:
2018-02-15 18:45:03
阅读次数:
196
1 public class MergeSort { 2 3 public static void sortIntegers(int[] array) { 4 // write your code here 5 if (array == null || array.length ==0 ) { 6 ... ...
分类:
其他好文 时间:
2018-02-15 00:40:36
阅读次数:
181
1 /* 2 * 1: time complexity o(n^2) 3 * 2: good performance for items around 10-20: better than merge sort and quick sort 4 * 3: no extra space needed ... ...
分类:
其他好文 时间:
2018-02-14 23:19:06
阅读次数:
233
import random from timewrap import * import copy import sys sys.setrecursionlimit(100000) def partition(li, left, right): # ri = random.randint(left, ...
分类:
编程语言 时间:
2018-02-13 19:53:01
阅读次数:
168
前面我们用Tensorboard显示了tensorflow的程序结构,本节主要用Tensorboard显示各个参数值的变化以及损失函数的值的变化。 这里的核心函数有: histogram 例如: 这里用tf.summary.histogram函数来显示二维数据在不同网络层的变化情况,其中第一个参数是 ...
分类:
其他好文 时间:
2018-02-13 10:33:03
阅读次数:
296
简要说明:RKE (Rancher Kubernetes Engine)是RancherLabs提供的一个工具,可以在裸机、虚拟机、公私有云上快速安装Kubernetes集群。整个集群的部署只需要一个命令、一个配置文件,解决了如何轻松部署Kubernetes的问题。尽管Rancher提供了免费的视频培训(见后面的参考链接),但用户在使用RKE时,还是会遇到了很多报错信息,无法安装成功,这主要是因为
分类:
Web程序 时间:
2018-02-12 20:04:21
阅读次数:
251