If you have a rough estimate for this square root of 11, you don't actually have to check is it divisible by four. All you have to check in the case of 11 is is itDivisible by two? Is it Divisible by three? And we go all the way to is a divisible by nine. The answer is nine is no, 10 times in a row. So now we know 11 is a prime number. On the other hand, if we already know that two, three, five, and seven are prime numbers. You can also stop iterating when you have reached the square root of n. Before you get to a better algorithm than that, you have

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode