/** * Created with IntelliJ IDEA. * User:
li_zhe * Date: 14/05/06 * Time: 12:34 * To change this template use File |
Settings | File Templates. */pack...
分类:
其他好文 时间:
2014-05-16 22:09:34
阅读次数:
431
问题描述:超市有4种包装的鸡蛋,分别是3个一盒,6个一盒,9个一盒和20个一盒。问顾客要买N个鸡蛋时,所有的组合方案。(Morgen Stanley 2014
Intern).核心代码: 1 void BuyeggsCore(vector &coins, const int target, int ...
分类:
其他好文 时间:
2014-05-16 20:17:07
阅读次数:
289
To speed up bulk loading of data, InnoDB
implements aninsert buffer, a special index in the InnoDB system tablespace that
buffers modifications to sec...
分类:
数据库 时间:
2014-05-16 18:26:09
阅读次数:
532
第1章容器第1条:慎重选择容器类型。标准STL序列容器:vector、string、deque和list。标准STL关联容器:set、multiset、map和multimap。非标准序列容器slist和rope。slist是一个单向链表,rope本质上是一“重型”string。非标准的关联容器ha...
分类:
编程语言 时间:
2014-05-16 07:50:48
阅读次数:
390
色彩及图像基础(二)学习时间:2014.04.30学到了……1. 图形分为矢量图和位图。 2.
矢量图(vector - based image),是用一系列计算机指令来描述和记录一幅图,这幅图可分解为一系列子图如点、线、面等。 3.
位图(bit-mapped image),是用像素点来描述或映射...
分类:
其他好文 时间:
2014-05-16 06:54:25
阅读次数:
346
题意:给定一棵二叉树,返回按层遍历的结果
思路1:bfs,定义一个新的struct,记录指针向节点的指针和每个节点所在的层
复杂度1:时间O(n),空间O(n)
思路2:dfs
递归函数:
void levelOrder(TreeNode *root, int level, vector<vector >&result)
表示把根为root的树按层存放在result中,其中level表示当前的层数
复杂度2:时间O(n),空间O(n)
相关题目:...
分类:
其他好文 时间:
2014-05-15 14:46:06
阅读次数:
355
快速排序最坏情况下时间复杂度是O(n*n),但是它平均时间复杂度是O(N*logn),并且常数因子很小,可实现就地排序,所以被作为内排序的常用排序方法.
#include
using namespace std;
void swap(int &i,int &j)
{
int temp=i;
i=j;
j=temp;
}
int partition(int *vector...
分类:
其他好文 时间:
2014-05-15 06:05:35
阅读次数:
254
本文出自:http://blog.csdn.net/svitter
自己的vimrc。。功能很少,持续更新。
目前支持缩进4个空格,高亮。
用了gvim的example,和bluedust的部分配置文件,用于C++的编辑。
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar
" Last change...
分类:
其他好文 时间:
2014-05-13 16:36:10
阅读次数:
510
//升序void insertion_sort(vector &num){
for(int i = 1; i =0 && num[j] >= val){
num[j+1] = num[j];...
分类:
其他好文 时间:
2014-05-13 11:42:59
阅读次数:
190
在学PHP的时候,偶然发现XAMPP窗口Apache的启动出现错误,出现以下的错误提示:
9:52:41 [Apache] Attempting to start Apache app...
9:52:41 [Apache] Status change detected: running
9:52:42 [Apache] Status change detected: stoppe...
分类:
Web程序 时间:
2014-05-13 11:26:38
阅读次数:
431