Quick Sort
--Divide and Conquer
--Sorts “in place”
--Very practical with tuning Divide and Conquer:
1.Divide: Partition array into 2 sub-arrays around pivot x such that elements in lower sub-array < x < elements in upper sub-array;
2.Conquer: …
Given n elements in array, find kth smallest element (element of rank k) Worst-case linear time order statistics --by Blum, Floyd, Pratt, Rivest, Tarjan
--idea: generate good pivot recursively. Not so hot, because the constant is pretty big.
怎么安装就不说了,网上一堆
这噶搭是配置 目录是/etc/vsftpd/vsftpd.conf
# Example config file /etc/vsftpd/vsftpd.conf#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more u…
Hash
|---Hash function: Division, Multiplication
|---Collision: Chaining, Open addressing(Linear,Double hasing) Symbol-table problem:
Table S holding n records
pointer --> key|satelite data (record) Hashing:
Hash function h maps keys “randomly”…
Random built Binary Search Trees BSTs
E[hight] near 3logn Quick Sort?
Relation to Quick Sort:
BST sort & Quick sort make same comparisons but in a different order. Randomized BST Sort:
1. Randomly permute A
2. BST sort(A)