由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 再问两题:1)number of 1s in an integer.2)A fast way to generate moves for TIC TAC TOE
相关主题
能发自学日志么?请推荐一本语言方面的C++书籍
An interesting C++ compile errorC++class指针转换
[合集] thinking in c++ 这书如何?JHQ的一道指针题。
问个INTERVIEW QUESTION问个很基础的问题
关于linked list的copy cstr和dstreasy problem coconut
问个问题我的C++ SW面试体会 (转载)
register variable我来出个赛马题
question for C++ constant被鸡蛋砸了
相关话题的讨论汇总
话题: tac话题: toe话题: tic话题: moves话题: number
进入Programming版参与讨论
1 (共1页)
g*****u
发帖数: 298
1
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.

g*****u
发帖数: 298
3
JHQ是什么?
1 (共1页)
进入Programming版参与讨论
相关主题
被鸡蛋砸了关于linked list的copy cstr和dstr
攒rp,面试经验报告问个问题
Tic Tac Toe 检查是否获胜的最优解是啥?register variable
小学五年纪数学题question for C++ constant
能发自学日志么?请推荐一本语言方面的C++书籍
An interesting C++ compile errorC++class指针转换
[合集] thinking in c++ 这书如何?JHQ的一道指针题。
问个INTERVIEW QUESTION问个很基础的问题
相关话题的讨论汇总
话题: tac话题: toe话题: tic话题: moves话题: number