Another Google question - drop glassballs from a building 5

Here are some results are the testcases:

1. PathFindTest.test4Ball100Floors():
The result is like this:

path=(f=56, b=3, whole, tried)-->(f=91, b=3, broken, tried)-->(f=71, b=2, broken, tried)-->(f=61, b=1, whole, tried)-->(f=65, b=1, whole, tried)-->(f=68, b=1, whole, tried)-->(f=70, b=1, broken, tried)-->(f=69, b=0, whole, tried)-->END
number of trials=8

The last one has the status "whole", so we have to go back to the first trial with "broken" status, which is the one before last, and it has floor 70.

2. PathFindTest.test1BallSingleCase()
Th result is like this:

path=(f=1, b=0, whole, tried)-->(f=2, b=0, whole, tried)-->(f=3, b=0, whole, tried)-->(f=4, b=0, whole, tried)-->(f=5, b=0, whole, tried)-->(f=6, b=0, whole, tried)-->(f=7, b=0, whole, tried)-->(f=8, b=0, whole, tried)-->(f=9, b=0, whole, tried)-->(f=10, b=0, broken, deducted)-->END
number of trials=9

The last one has the "deducted" flag, this means this element will be excluded from the size of the path since it's a logic deduction, no real trial happened.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值