w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Finding an algorithm/strategy for a hotel riddle

This is the Secretary problem. Under the assumption that the hotels show up in a random order, the optimal strategy is to drive past 37% of the hotels and then take the next one that is better than all seen so far (or take the last one).

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.