摘要:
5.1-1:Since we can compare between any two elements, we know the total order on the ranks of the candidates.5.1-2:RANDOM(a,b)%range = b - a;%d = the number of binary bits %range hasdofor(%i = 1 to %d):%i th bit of integer %res = rand(0,1);while(%res > %range);return (a + %res);Each time of while 阅读全文