设计模式之第1章-工厂方法模式(Java实现) “我先来”,“不,老公,我先!”。远远的就听到几个人,哦不,是工厂方法模式和抽象工厂模式俩小夫妻在争吵,尼妹,又不是吃东西,谁先来不都一样(吃货的世界~)。“抽象工厂模式,赶紧的自我介绍,工厂方法模式,你身为男人,要懂得绅士风度,lady first....
分类:
编程语言 时间:
2015-01-16 19:05:13
阅读次数:
187
题目:Given an array where elements are sorted in ascending order, convert it to a height balanced
BST.
思路:给出一个排序的数组,如何构造一个平衡二叉查找树?平衡二叉查找树要求任一结点的左右子树的高度差不能超过一,也叫做高度平衡树。如果让我们从一个排序数组中选取一个元素做树的根,我们会选择哪一个...
分类:
编程语言 时间:
2015-01-16 16:51:25
阅读次数:
237
题目:
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
Given ...
分类:
编程语言 时间:
2015-01-16 16:46:28
阅读次数:
179
Meet Lucid Fusion
https://docs.lucidworks.com/display/fusion/Getting+Started
http://zh.hortonworks.com/partner/lucidworks/
https://lucidworks.com/blog/noob-notes-fusion-first-look/
hadoop@ha...
分类:
其他好文 时间:
2015-01-16 13:09:53
阅读次数:
264
Classify handwritten digits using the famous MNIST data
This competition is the first in a series of tutorial competitions designed to introduce people to Machine Learning.
The goal in this comp...
分类:
其他好文 时间:
2015-01-16 13:07:42
阅读次数:
499
对li标签的相关操作——8种方式获取li标签的第一个元素的内容1、alert($("ul>li").first().html());2、alert($('ul>li').eq(0).html());3、alert($('ul>li:nth-child(1)').html()); 4、alert($(...
分类:
Web程序 时间:
2015-01-16 12:40:33
阅读次数:
183
Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run in O(n) time and uses constant...
分类:
其他好文 时间:
2015-01-16 10:05:38
阅读次数:
136
原文:算法系列15天速成——第九天 队列
可能大家都知道,线性表的变种非常非常多,比如今天讲的“队列”,灰常有意思啊。 一:概念 队列是一个”先进先出“的线性表,牛X的名字就是“First in First Out(FIFO)”, 生活中有很多这样的场景,比如读书的时候去食堂打饭时的”排队“。当然我...
分类:
编程语言 时间:
2015-01-16 09:57:05
阅读次数:
194
原文:算法系列15天速成——第十天 栈
今天跟大家聊聊栈,在程序设计中,栈的使用还是非常广泛的,比如有“括号匹配问题“,”html结构匹配问题“。
所以说掌握了”栈“的使用,对我们学习算法还是很有帮助的。 一: 概念 栈,同样是一种特殊的线性表,是一种Last In First Out(LIFO)的...
分类:
编程语言 时间:
2015-01-16 09:53:53
阅读次数:
296
CSS伪元素选择器 伪元素选择器:为元素的效果是需要通过添加一个实际的元素才能达到的. CSS中有如下四种伪元素选择器: :first-line:为某个元素的第一行文字使用样式. :first-letter:为某个元素中的文字的首字母或者第一个字使用样式. :befo...
分类:
Web程序 时间:
2015-01-16 09:52:57
阅读次数:
178