3 ms·
See also the "Elephant in Cairo" search algorithm: 1. Go to Africa. 2. Put an elephant in Cairo. 3. Start at the Cape of Good Hope. 4. Work northward in an
by cpeterso 7y ago
See also the "Elephant in Cairo" search algorithm:
1. Go to Africa.
2. Put an elephant in Cairo.
3. Start at the Cape of Good Hope.
4. Work northward in an orderly manner, traversing the continent alternately east and west,
5. During each traverse pass:
* Catch each animal seen.
* Compare each animal caught to a known elephant.
* Stop when a match is detected.
6. If you are in Cairo, then there are no elephants in Africa (other than the one you placed there).
https://en.m.wikipedia.org/wiki/Elephant_in_Cairo https://en.m.wikipedia.org/wiki/Elephant_in_Cairo
- JadeNB 7y ago> 6. If you are in Cairo, then there are no elephants in Africa (other than the one you placed there). Or, perhaps, other elephants already in Cairo ….
- Viliam1234 7y agoI suspect there is a "Falsehoods programmers believe about elephants" article somewhere...
- cardiffspaceman 7y agoNot to mention, falsehoods about the geography of Africa. https://en.wikipedia.org/wiki/Cape_Agulhas https://en.wikipedia.org/wiki/Cape_Agulhas
- robocat 7y agoThat algorithm literally has race condition faults. It needs a movable memory fence that stretches from East to West.