public static void testFindAlgorithm(int[] ns, float[] ks, Random source, int repeatFactor, float myFactor){
        Callback cb = new Collector();
        Callback comp = new Collector();

        RandomizedAlgorithm rand = new FindAlgorithm();
        rand.setRandomSource(source);

        for(int n : ns){
            List<Integer> data = numbers(n);
            double my = 2 * Math.log(n);
            double my2 = myFactor*2*Math.log(n);
            System.out.println("my="+ my +" 2*my=" + my2);
            int repeats = n*repeatFactor;
            for( float kp : ks){
                int k = Math.min(n,Math.max((int)(n*kp),1));
                float above = 0;
                float totalZ= 0f;

                for(int repeat = 0; repeat < repeats; repeat++){
                    rand.algorithm(data,k,cb,comp);
                    int Z = cb.collect()-1;
                    totalZ += Z;
                    if(Z > my2){
                        above+=1;
                    }
                }

                System.out.println("n=" + n + " k=" + k + " above=" + above+ " repeats=" + repeats + " factor=" + above/repeats + " avg=" + totalZ/repeats);
            }
        }
    }