译者:becool
作者:Don Lee
原文:Some owners deserting factories in China
译文:老板正在抛弃中国的工厂
老板正在抛弃中国的工厂
老板抛弃了在金融危机中泥足深陷的工厂,留下没拿到工资的工人和没结清的债务。
陶寿龙先烧掉了公司的财务账册,然后卖掉了私人高尔夫俱乐部的会员资格,处理掉了自己的奔驰S600,最后逃之夭夭。
就这样,中国最大的印染集团-拥有四家工厂,一个足有三十一个足球场大的...
回溯法,代码如下:
/**
* author Akalius Kung 2008-2-8
**/
public class Queen {
private int[] grids; // location in each row, index is each row, array value is location of each queen
private int n;
private static int sum;
public Queen() {
init(8);
}
public Queen(int n) {
this.n = n;
grids=new int[n];
for(int i=0;i<n;i++){
grids[i]=0;
}
}
private void init(int n){
...
/**
* author Akalius Kung 2008-2-9
**/
public class HeapSort {
private int heapLen;
private int[] sort(int[] array){
heapLen=array.length;
buildHeap(array); // init the heap
for(int i=heapLen-1;i>0;i--){ // swap root and last node, up to down
swap(array,i,0);
heapLen--;
heapify(array,0); // reheapify the root node from 0 to n-1
}
return array;
}
private void buildHeap(i...