3 ms·
> "I'd fail an interview candidate that suggested adding 1 each time for subsequent prime testing" Congratulations! You must be that arrogant guy everybody hat
by csmpltn 3y ago
> "I'd fail an interview candidate that suggested adding 1 each time for subsequent prime testing"
Congratulations! You must be that arrogant guy everybody hates interviewing with, the one with the superiority complex.
How about instead of just failing people over literally nothing (wasting everybody's time and money) - just ask the candidate whether they could somehow reduce the search space by utilizing the properties of a prime number?
- hyperbovine 3y agoHow many even numbers are prime?
- wavemode 3y agoOne.
- awwaiid 3y agoTwo when you include -2, which I certainly think we should in this circumstance.
- chaboud 3y agoAre we including it just to poke the bear? Prime numbers are typically defined as numbers with no positive divisors other than one and the number in question.
- TeMPOraL 3y agoA definition which marks 1 as being prime :).
- tuukkah 3y agoThis thread started with AI code whose correctness of is_prime no-one has questioned so far :-D -1 True 0 True 1 True 2 True 3 True 4 False
- chaboud 3y agoWell, I’m questioning it… not that it really matters. -1, 0, and 1 are no good. Two divisors for positive integer X: 1, X I recently demonstrated GPT-4 via by having it explain phases of matter metaphorically with animals. Though impressive, it points to loose abstraction being more in range than firm abstraction. Let’s get that model a python interpreter and see how far we can take this party. Until then, I’m going to stick to explaining concepts. ————- included here for fun Alright! Let's dive into the wild world of matter using some animal friends as examples: 1. *Solids* - Think of solids like a herd of elephants standing closely together. The elephants are packed in tight, barely moving, just maybe swaying a bit. They're sturdy and strong, just like solid things in our world. This is because the particles in a solid don't move around much; they just vibrate in place. 2. *Liquids* - Imagine a school of fish swimming in a pond. They're free to move around, weaving in and out, but they still stay pretty close to each other. They aren't packed as tightly as our elephant friends, but they aren't completely free either. This is like liquids: the particles are close, but they can move around and flow, just like water in a glass. 3. *Gases* - Now, picture a flock of birds soaring in the sky, free to fly in all directions. These birds aren't sticking close to one another; they're spread out, enjoying the vast space of the sky. In gases, the particles are like these birds, very spread out and moving all over the place. 4. *Plasma* - Think of plasma like dragons (I know they're mythical, but bear with me). These dragons breathe fire, and that fire is so hot and energetic that it can change the way things behave. Plasma is like that – it's gas that's become so hot that the particles are super energized and can even glow, like neon lights. 5. *Bose-Einstein Condensate (BEC)* - This one's a bit trickier, but imagine penguins in Antarctica. They huddle closely together to keep warm. BEC is like the coldest group of particles ever, where they start acting in strange, uniform ways, almost like one giant super-particle. It's like all the penguins moving together as one. So, next time you think of matter, just remember our animal friends: the sturdy elephants, the flowing fish, the free-flying birds, the fiery dragons, and the huddled penguins!
- squeaky-clean 3y agoNegatives are not prime.
- hyperbovine 3y agoVery good. So why is it necessary to check all of them.
- Biganon 3y agoIt is not, and nobody said it was.
- lynx23 3y agoDownvoting this is not enough. I'd pay $5 (reddit style) to have this properly killfiled if HN allowed for that. Besides, not "everybody hates them, only those inmature enough to still need intellectual babysitting.
- throwmeback 3y agoWhoa there Satan