@neetcode1 i had to walk a junior data analyst through this once. non-descending, non-consecutive, sorted numbers (MRNs), 50 result max per page, no search, tens of thousands of pages. he was literally going page by page "what if i miss it"
@neetcode1 I actually used binary search to find the point at which my own bike had been stolen! It was a long security tape, and the bike disappeared at some point, and I literally did the binary division search on the tape!
@neetcode1 I learned this when I was learning English and needed to lookup translation in the dictionary (actual book) I was 12.
@neetcode1 @mattwridley I’m pretty sure the cop understood already had to do that. He just had no interest in finding the bike
@neetcode1 Funny thing about this is that I had no idea what it was called but I instinctively do this.
@neetcode1 Stuff like that is the daily struggle of smart people…
@neetcode1 also with steve balmers guess my number interview question
@neetcode1 @nisten They aren't unless you can persuade a cop
@neetcode1 This works for finding things that ARE then and then Arent' there. Change that to "I want to find when the person drove up"...
@neetcode1 The problem is he used an analogy. Simple man don't like no analogy. He should have just said "Show me the tapes I'll find it in under 5 minutes"
@neetcode1 This is no laughing matter. Cambridgeshire cops were notorious for their intellectually dishonest explanations around the cost of searching CCTV footage for stolen bikes.
@neetcode1 I thought everyone informally learned binary search playing the "higher/lower" game with numbers. Apparently I was wrong.
@neetcode1 when I was a 10 year old kid, I used this binary search to search action clips in a movie, and I knew nothing about algorithm, it's just common sense!
@neetcode1 You don't even need education in computer science to be able to understand that this is how you should approach this task. It's common sense.
@neetcode1 Exactly the process used to find a leak in the brake pipe of a vacuum-braked freight train! Split the train, test the front half, if all ok test the back half, then split the half with the leak. You can guess the rest!
@neetcode1 This is why even if AI becomes so good to replace programmers, it is still beneficial to know how to program.
@neetcode1 Binary search is probably one of the most widely used algorithm in everyday's life. Everyone who has ever looked up a word in a dictionary has used it, even if they didn't know it.
@neetcode1 I tried to explain this to the security officers at my previous organisation too when I lost my earbuds in the office. But yeah, they don’t listen. 🤷♂️
@neetcode1 And I thought I was the only one who uses binary search to find a specific point in videos 🤣
@neetcode1 Sad but not surprising. Cops hate cyclists and especially hate doing paperwork It's honestly very depressing how much money they extort from the public with very little to show for it
@neetcode1 Oohh now I get it, the bike is in the view of the CCTV until it’s stolen. I thought the thief would be riding across the screen at a given point no way binary search would help
@neetcode1 >sorting algorithms rage every time I see this pasta
@neetcode1 Cops don't want to waste their time looking for bikes. All they do is fill a form with the serial number. Put it in a drawer or a database. And then forget about it. Bikes are generally not worth all the manhours needed to search for one.
@neetcode1 You don’t have to be a coder for this. It’s ever so slightly “advanced common sense”.
@neetcode1 I was going to say that I'm sure the cop understands it, he's for sure used a physical dictionary or a phone book sometime in his life, but I guess that's no longer a given. Damn I'm old.
@neetcode1 No one needs that algorithm explained to them. It comes intuitively to anyone who has used a phonebook. Or any sorted list.