All pastes #769124 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-11-11 03:50 UTC
rendered paste body
 int win = ((Integer)(p.getValue())).intValue();
         Scanner infile = new Scanner(new File("J_names.txt"));
         p = new ListNode(infile.next(),null);
         t=p;
         for(int x=2;x<=s;x++){
            t.setNext(new ListNode(infile.next(),null));
            t=t.getNext();
         }
         t.setNext(p);
         replaceAt(p,"Josephus",win);
         while(p.getNext()!=p){
            print(p);
            p=remove(p,n);
         }
         print(p);