Daily Archives: October 8, 2012

get permutation

  package algorithm.weixin; public class Perm {     public static void swap(int[] v, int i, int j) {        int t;        t = v[i];        v[i] = v[j];        v[j] = t;    }     public static void perm(int[] v, int n, int i) … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

archeive of interesting code

good site:   http://www.keithschwarz.com/interesting/

Posted in programming | Tagged | Leave a comment

Analysis of Algorithms: Lecture 24

From Evernote: Analysis of Algorithms: Lecture 24 Clipped from: http://www.cs.utexas.edu/users/djimenez/utsa/cs3343/lecture25.html Algorithms for Permutations and Combinations Here are some algorithms I have found useful in surprisingly many instances: Generating Permutations of a Set of Elements We know that there are n! … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Combinations Algorithm

  http://computerserviceofsouthflorida.com/algorithms.html   Combinations Algorithm Introduction=========This is a general algorithm for generating the combinations when x items arechosen from y items. The number of combinations is given by the formula:y!/((y-x)!x!), where ! denotes factorial. This number is easily calculated.The problem … Continue reading

Posted in programming | Tagged | Leave a comment

generate subset with size k

http://stackoverflow.com/questions/4555565/generate-all-subsets-of-size-k-from-a-set

Posted in programming | Tagged | Leave a comment

那些年我们一起清除过的浮动

http://www.cnblogs.com/mofish/archive/2012/05/14/2499400.html   http://www.cnblogs.com/mofish/archive/2012/05/14/2499400.html

Posted in front end | Tagged | Leave a comment

前端开发面试题答案_web前端

http://blog.sina.cn/dpool/blog/ArtRead.php?nid=7fcde0e201012uc7&a_pos=1&PHPSESSID=68e7b81e8bfec02b84d7e32e5b2ce2c7&&page=rest1

Posted in Uncategorized | Leave a comment