1。Give a very good method to count the number of ones in a "n" (e.g. 32)
bit number. Find a solution that does it in log (n) steps.
2. In a X's and 0's game (i.e. TIC TAC TOE) if you write a program for this
give a fast way to generate the moves by the computer. I mean this should be
the fastest way possible.
t****t 发帖数: 6806
2
JHQ
this
be
查表,最多3^9个状态
【在 g*****u 的大作中提到】 : 1。Give a very good method to count the number of ones in a "n" (e.g. 32) : bit number. Find a solution that does it in log (n) steps. : 2. In a X's and 0's game (i.e. TIC TAC TOE) if you write a program for this : give a fast way to generate the moves by the computer. I mean this should be : the fastest way possible.