Algorithm to find minimum number of weightings required to find defective ball from a set of n balls

后端 未结 3 958
梦谈多话
梦谈多话 2021-01-02 22:05

Okay here is a puzzle I come across a lot of times- Given a set of 12 balls , one of which is defective (it weighs either less or more) . You are allow to weigh 3 times to f

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-02 22:15

    You could use a general planning algorithm: http://www.inf.ed.ac.uk/teaching/courses/plan/

提交回复
热议问题