Given an array of integers, every element
appears twice except for one. Find that single one. Note: Your algorithm should
have a linear runtime comple...
分类:
其他好文 时间:
2014-05-23 07:22:48
阅读次数:
241
应一些人之邀。。。发一篇代码 1 #include 2 #include 3 #include 4
#include 5 6 using namespace std; 7 struct node 8 { 9 int data; 10 int key;
11...
分类:
其他好文 时间:
2014-05-23 05:17:06
阅读次数:
246
1 #include 2 //quickSort 3 int partition(int
a[],int start,int end) { 4 int node = a[start]; //初始节点 5 while(start= node
&& end > start) ...
分类:
其他好文 时间:
2014-05-23 04:04:22
阅读次数:
304
【7.4】 1 #include 2 #include 3 #include 4 using
namespace std; 5 #define MAXN 100 6 7 typedef struct node{ 8 char data; 9 node
*lchild;10 ...
分类:
其他好文 时间:
2014-05-23 03:26:20
阅读次数:
260
Given an array of integers, every element
appearstwiceexcept for one. Find that single one.Note:Your algorithm should have
a linear runtime complexity...
分类:
其他好文 时间:
2014-05-22 16:31:03
阅读次数:
194
Given a binary tree, find its maximum depth.The
maximum depth is the number of nodes along the longest path from the root node
down to the farthest le...
分类:
其他好文 时间:
2014-05-22 16:05:56
阅读次数:
239
【题目】
The count-and-say sequence is the sequence of integers beginning as follows:
1, 11, 21, 1211, 111221, ...
1 is read off as "one 1" or 11.
11 is read off as "two 1s" or 21.
21 is read off as "one 2, then one 1" or 1211.
Given an integer n, generate...
分类:
其他好文 时间:
2014-05-21 15:20:07
阅读次数:
213
最近闲来无事写了一个统计C或者C++代码行数的程序,主要用到了python以及正则表达式
#-*-coding:utf-8
#!/usr/bin/python
import re
import os
import sys
'''get the file or dir in one path'''
def getfilename(path):
if os.path.exi...
分类:
编程语言 时间:
2014-05-21 15:06:30
阅读次数:
379
Node-Canvas 安装的时候,并没想到有如此多的坑。看来npm也不是万能的。canvas需要cario,而cario需要libpng,又需要pixman,同时pkg-config更是前提,官网提供的pkg-config版本又在Mac OS 10.9 上有问题。本文将对node-canvas安装提供简要的讲解和坑的填充。...
分类:
其他好文 时间:
2014-05-21 14:44:48
阅读次数:
1937
WebStorm
8 with IdeaVim plugin
vim, sublime
sublime加上node插件。
nide
Brackets
vim + jshint2.vim
eclipse
Visual Studio 2013 + NTVS(Node.js
Tools for Visual Studio)
notepad++
atom.io
Nodejs c...
分类:
Web程序 时间:
2014-05-21 13:36:47
阅读次数:
493