The problem description, based on my understanding, means how much money you need to GUARANTEE a win base on Optimal Strategy (binary search)
How could you guarantee a win with $1 for n=2?
my answer output 2 for n=2 but the leetcode answer is 1
that is simple, you should pick the smaller one rather than bigger one firstly. In this case only two possible ints are 1 and 2, we should guess 1 first. so the max loss is $1
@kira4 thanks. this is clear for me now.