this post was submitted on 02 Dec 2024
1498 points (99.3% liked)

Memes

8527 readers
1012 users here now

Post memes here.

A meme is an idea, behavior, or style that spreads by means of imitation from person to person within a culture and often carries symbolic meaning representing a particular phenomenon or theme.

An Internet meme or meme, is a cultural item that is spread via the Internet, often through social media platforms. The name is by the concept of memes proposed by Richard Dawkins in 1972. Internet memes can take various forms, such as images, videos, GIFs, and various other viral sensations.


Laittakaa meemejä tänne.

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] jol@discuss.tchncs.de 2 points 3 weeks ago (2 children)

Binary search only works if the fuses were correctly sorted in the same order as the houses though.

[–] domdanial@reddthat.com 22 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I don't think that's true, it's more of a set problem. If you pull half the fuses, and the thing is still on, then you've ruled out that half. Then you pull half the remaining fuses, and if it turns off it was one of the new half you pulled. Then you put another half back in, ect .

[–] jol@discuss.tchncs.de 6 points 3 weeks ago

Ah, I didn't think of it that way. That indeed would work.

[–] Ephera@lemmy.ml 4 points 3 weeks ago (1 children)

You know, after posting that comment, I really doubted myself, if it really is binary search, because Wikipedia also tells me it needs to be a sorted array.

But yeah, I think that's only relevant, if your method of checking whether it's in one half or the other uses > and <. As far as I can tell, so long as you can individually identify the fuses, a.k.a. they're countable, then you can apply binary search.

[–] lunarul@lemmy.world 3 points 3 weeks ago

If when you divide your set in two, you can reliably tell which of the two subsets definitely has what you're looking for, then it's binary search.