求前辈们来帮我解决个问题吧~~我好着急
BitVector是解决某些特定问题的常用方法.以下为一个已经完成的类:public class BitVector
{
private int x[];
int n,hi;
final static int MASK=0x1f;
final static int SHIFT=5;
final static int BITSPERWORD=32;
public BitVector(int length)
{
hi=length;
x=new int[1+hi/BITSPERWORD];
for(int i=0;i<length;i++)
{
clr(i);
}
n=0;
}
private void clr(int i)
{
x[i>>SHIFT]&=~(1<<(i&MASK));
}
public void set(int i)
{
x[i>>SHIFT]|=(1<<(i&MASK));
}
public int test(int i)
{
return x[i>>SHIFT]&(1<<(i&MASK));
}
}
请使用此类来实现一个排序方法.
public void order(int a[])
{
//请填入代码
___________________________________
___________________________________
___________________________________
___________________________________
___________________________________
___________________________________
}