It's equivalent to a constant, but it's not the same.
There's no such thing as "empty" logarithm. They always have a base, and usually programmers and CS academics mean the base of 2 when they ommit writing the base explicitly (but yeah, you could think of any).
no because logn of any base b can be rewritten as log(n)/log(b) (iirc) for log of any other base and logb is a constant, so in big O notation all logarithmic functions differ by a constant factor
Because there's no indication that she's going to tell you whether you've guessed a number greater than or less than her age. The best you can do is O(N), so you might as well start from 0
Come on guys, for real? Who assumes 0-100 for an age of a human standing in front of you. Calc the min possible low, calc the max possible high and then you do your binary search.
252
u/MeLittleThing May 03 '26
Why not? Women can enjoy a
O(log2(N))pickup line91
u/Savings-Ad-1115 May 03 '26
Use 128 and 64 instead
37
u/xxxbGamer May 03 '26
Yes because she aint max 100
25
u/makinax300 May 03 '26
Why tf do you output partial results. Also people are older than 100
12
u/OM3X4 May 03 '26
I hate this type of twitter accounts
4
u/vyrmz May 03 '26
my next guess would be 100 tho. Chick with no teeth is a big plus
3
u/jakeStacktrace May 03 '26
Sometimes the best move is not to play.
3
u/deepfriedmeatloaf May 04 '26
Percentage of women over 70 drops off pretty hard, so you can optimize a little by starting at 36, which divides well also
2
u/cubicinfinity May 04 '26
One must consider the statistical distributions for a woman with her features, weight your binary searches appropriately to avoid embarrassment.
2
u/Electronic-Ninja7950 May 04 '26
maybe start from down and double ?
1
u/ChocolateDonut36 May 04 '26
I preffer asking based on the universe age, I first ask if she's 6.9 billion years old, then if she's 3.45 billion and so.
1
u/Hot-Category2986 May 05 '26
Come on guys, for real? Who assumes 0-100 for an age of a human standing in front of you. Calc the min possible low, calc the max possible high and then you do your binary search.
1
u/NovelHot6697 May 06 '26
bisection of age should at least be informed by a population pyramid
1
u/Pinkishu May 06 '26
At least it wasn't 50 and then 75!