MergeKSORTEDLIST

    int log = (int)(Math.log(k)/Math.log(2));

	        log = log < Math.log(k)/Math.log(2)? log+1:log; // take ceiling
  int offset = j+(int)Math.pow(2,i-1);
	                lists.set(j, mergeTwoLists(lists.get(j), (offset >=
lists.size()? null : lists.get(offset))));