快速排序算法。python实现。 1 # -*- coding: utf8 -*- 2 3
import random 4 5 def partition(mylist, low, high): 6 pivotkey = mylist[low] 7
while low = piv...
分类:
其他好文 时间:
2014-05-17 01:25:40
阅读次数:
305
yanzhihong@yzh:~/nook3$ file noogie.img
noogie.img: x86 boot sector; partition 1: ID=0xc, active, starthead 1,
startsector 32, 155616 sectors, code of...
分类:
其他好文 时间:
2014-05-16 08:31:35
阅读次数:
236
快速排序最坏情况下时间复杂度是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
1. Check the /boot partition size to decide if need clean up
$ df
2. Check the current used Linux kernel
$ uname -r
3. Check all Linux kernel to decide which ones to be removed
$ ls /boot...
分类:
其他好文 时间:
2014-05-15 03:24:16
阅读次数:
235
首先查看数据盘的信息,找到新添加的数据盘,如/dev/xvdbfdisk
-l然后将数据盘分区fdisk /dev/xvdb#然后根据提示#输入 n ,表示设定新的分区#输入 p ,表示Primary
partition(主分区)#输入 1 ,表示只分1个区。再次查看数据盘的信息,便会发现数据盘分区...
分类:
其他好文 时间:
2014-05-14 06:57:25
阅读次数:
256
VFlib
开源算法库网站:http://www.cs.sunysb.edu/~algorith/implement/vflib/implement.shtmlNauty
开源算法库网站:http://cs.anu.edu.au/people/bdm/nauty/
分类:
其他好文 时间:
2014-05-13 18:32:10
阅读次数:
289
显示提交关系图
git log --graph --oneline
显示最近的几条日志
git log -3 --pretty=oneline
显示每次提交的具体改动
git log -p -1
显示每次提交的变更概要
git log --state --oneline
定制输出
git log --pretty=raw -1
git log --pretty=fuller -...
分类:
其他好文 时间:
2014-05-13 14:05:35
阅读次数:
250
基本概念及定理1. 欧拉通路、欧拉回路、欧拉图无向图:1)
设G是连通无向图,则称经过G的每条边一次并且仅一次的路径为欧拉通路;2) 如果欧拉通路是回路(起点和终点是同一个顶点),则称此回路为欧拉回路(Euler
circuit);3) 具有欧拉回路的无向图G称为欧拉图(Euler graph...
分类:
其他好文 时间:
2014-05-13 11:11:13
阅读次数:
363
邻接矩阵的图示:
构建一个这样的无向邻接矩阵。
参考网站: http://www.geeksforgeeks.org/graph-and-its-representations/
这里写了个类,增加删除图的操作。
#pragma once
#include
#include
class AdjListGraph
{
struct Node
{
int dest;
...
分类:
其他好文 时间:
2014-05-11 22:44:20
阅读次数:
378
效果图:
此程序主要的知识点是:SimpleAdapter本身是不支持网络图片的, 如果在Map.put(a,b)中 b为一个Bitmap,程序不会报红色字体,而是在控制台输出绿色的字体,如下
05-10 15:46:45.474: I/System.out(846): resolveUri failed on bad bitmap uri: android.graph...
分类:
移动开发 时间:
2014-05-11 20:35:03
阅读次数:
506