this post was submitted on 30 Nov 2023
2544 points (99.6% liked)

Programmer Humor

18962 readers
771 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] -1 points 8 months ago (4 children)

I do not get why it would work in that case. I assume the scenario is someone with a bike coming, doing theft, then leaving with the same bike.

Therefore there will be a period without bike, then a period with bike, then a period without bike again.

Let's assume there is no bike on the particular moment viewed. How do you know whether it occured before or after the theft? If you make the wrong decision, you get stuck on an endless binary search.. Unless you take note at each timestamp where you made the decision, draw a tree of timestamps, and go back the tree if your search is fruitless but that's much more complicated than what this post says.

[–] [email protected] 10 points 8 months ago (1 children)

You're making this way more complicated than it actually is. The guy definitely can give estimates for when he parked the bike and when he found out that it was stolen. It's not that complicated.

[–] [email protected] 1 points 8 months ago

I misunderstood the problem. I thought the thieve came on bike to steal something. I did not get that the bike itself was what got stolen.

load more comments (2 replies)