Largest Prime Factor | Project Euler 3 | 30 Minutes-ish freeCodeCamp
So back with some project Euler and retardation that matches a slug traveling to Nevada. This challenge went a bit better, seeing as it took me 20 minutes to learn basic Math from primary and then deciding to cheat and finishing the challenge in 5 minutes or so.
Basically what I am saying is the video is 32 minutes of which only 2 minutes have any form of substance.
There is a way to test for primes using a formula but the higher the number the more false positives you get. You then need to add a list of primes to check against in the test and there are other tests, all of which will take too damn long to figure out.
So for this challenge I had to get the highest Prime factor of a number, this means the biggest prime number that divides into a number and leaving me with 0.
I stole a list of 1000 Prime numbers, reversed it and found the first one that gives me 0 on division. Simple, but probably cheating.
You can find the blog post here:
https://www.freecodecamp.org/news/projecteuler100-coding-challenge-competitive-programming/
And the code site here:
https://www.freecodecamp.org/learn/coding-interview-prep/project-euler/
Leave Largest Prime Factor | Project Euler 3 | 30 Minutes-ish freeCodeCamp to:
Read more #code posts
Best Posts From smokingfit
We have not curated any of smokingfit's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From smokingfit
- My Actifit Report Card: February 28 2022
- My Actifit Report Card: February 23 2022
- My Actifit Report Card: February 22 2022
- My Actifit Report Card: February 21 2022
- My Actifit Report Card: September 16 2021
- My Actifit Report Card: August 12 2021
- My Actifit Report Card: June 14 2021
- My Actifit Report Card: June 11 2021
- crypto-finally-has-a-reason-to-exist-decentralized-finance ~ BLOOMBERG
- My Actifit Report Card: June 10 2021