Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the ...
分类:
其他好文 时间:
2018-12-27 15:13:30
阅读次数:
134
一.random 随机模块 from xxx import xxx 从xxx里面导入xxx 二.Counter 计数模块 三.defaultdict 默认值字典模块 四.栈,队列 栈 : 先进后出 队列 : 先进先出 五. time 时间模块 时间戳格式化 : 先把时间戳 转换成结构化时间(loca ...
分类:
其他好文 时间:
2018-12-27 03:34:20
阅读次数:
128
介绍Named Parameter Idiom,解决C++只有位置参数,使用不方便容易出错的问题 ...
分类:
编程语言 时间:
2018-12-27 03:31:46
阅读次数:
198
1. 建立员工目录 ES数据库对象与关系型数据库对象对比 Relational DB -> Databases -> Tables -> Rows -> ColumnsElasticsearch -> Indices -> Types -> Documents -> Fields 语法 VERB H ...
分类:
其他好文 时间:
2018-12-27 03:07:21
阅读次数:
130
才疏学浅,智商不够,花了一晚上看了二叉树。记录一下: 1.二叉树的遍历 前序遍历:根节点->左子树->右子树 中序遍历:左子树->根节点->右子树 后序遍历:左子树->右子树->根节点 三层二叉树: A ↙ ↘ B C ↙ ↘ ↙ ↘ D E F G前序:先把BDE,CFG看做是A的左右子节点,因此 ...
分类:
编程语言 时间:
2018-12-27 03:05:36
阅读次数:
181
一、索引访问修改 list[index]=value 索引不能超界 二、列表增加、插入元素 1、append(object) ->None(没有返回值): 列表末尾追加元素,返回None;返回None就意味着没有新的列表产生,就地修改;时间复杂度是O(1) 2、insert(index,object ...
分类:
其他好文 时间:
2018-12-27 00:33:21
阅读次数:
120
1 二分查找:二分查找从有序列表的候选区data[0:n]开始,通过对半查找的值与候选区中间的值进行比较 方法一:利用for循环, 时间复杂度是o(n) li = [1, 3, 5, 7, 9, 11, 15, 18, 20] def linear_serach(li, value): for i ...
分类:
编程语言 时间:
2018-12-26 21:24:47
阅读次数:
234
大概1560~1569行 pos : function() { var self = this, node = self[0], x = 0, y = 0; if (node) { if (node.getBoundingClientRect) { var box = node.getBoundin ...
分类:
其他好文 时间:
2018-12-26 20:57:38
阅读次数:
186
title: JavaScript中Number常用属性和方法 toc: false date: 2018 10 13 12:31:42 ——1.7976931348623157e+308,可表示的最大数 ——5e 324,可表示的最小数 <! more ——把对象的值转换为指数计数法 ——把数字转 ...
分类:
编程语言 时间:
2018-12-26 20:23:33
阅读次数:
240