快速排序算法。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
这次省赛感觉题目没有wangs说的那么难,记得比赛之前的训练赛,wangs说你们现在做的题目太水了,省赛题的最简单的题目都比你们做的最难的还要难,去的时候在车上就在想,这下要玩over了!都不知道能AC几道题目,虽然我们是友情队,但是也不要一道题目也不能A吧!如果真是那样的话,我们平时的训练就完.....
分类:
其他好文 时间:
2014-05-16 05:57:32
阅读次数:
247
Jordan Brand has been going out of theAir
Jordan 6 World Cup Brazilordinary with some of their Retro colorways over the
last few years and the trend c...
分类:
其他好文 时间:
2014-05-15 16:47:00
阅读次数:
288
快速排序最坏情况下时间复杂度是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
1、Ring的基本概念
Ring是swfit中最重要的组件,用于记录存储对象与物理位置之间的映射关系,当用户需要对Account、Container、Object操作时,就需要查询对应的Ring文件(Account、Container、Object都有自己对应的Ring),Ring 使用Region(最近几个版本中新加入的)、Zone、Device、Partition和Replica来维护这些信...
分类:
其他好文 时间:
2014-05-14 15:22:15
阅读次数:
1213
题目一:
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "aab",
Return
[
...
分类:
其他好文 时间:
2014-05-14 15:10:01
阅读次数:
293
一、 创建表
在官方的wiki里,example是这样的:
Sql代码
CREATE [EXTERNAL] TABLE [IF NOT EXISTS] table_name [(col_name data_type [COMMENT col_comment], ...)] [COMMENT table_comment] [PARTITION...
分类:
数据库 时间:
2014-05-14 14:50:27
阅读次数:
463
首先查看数据盘的信息,找到新添加的数据盘,如/dev/xvdbfdisk
-l然后将数据盘分区fdisk /dev/xvdb#然后根据提示#输入 n ,表示设定新的分区#输入 p ,表示Primary
partition(主分区)#输入 1 ,表示只分1个区。再次查看数据盘的信息,便会发现数据盘分区...
分类:
其他好文 时间:
2014-05-14 06:57:25
阅读次数:
256