Tag: rust
Project Euler # Problem 9 - Special Pythagorean Triplet
In order to generate Pythagorean Triples we can use Euclid's Formula
Read Time: 2 min
Posted: October 6, 2023
CodingMathPythonRust
Project Euler # Problem 6 - Sum Square Difference
The problem with this approach is that if we change the range, say from [1 - 100] to [1 - 1 000 000], it would take a much longer time to calculate. What if we could skip all this and have a much faster approach?
Read Time: 1 min
Posted: October 1, 2023
CodingMathPythonRust
Project Euler # Problem 5 - Smallest multiple
The solution involves what we have seen in previous problems: prime factorization. Let's look at the example given in the problem.
Read Time: 2 min
Posted: April 28, 2023
CodingMathPythonRust
Project Euler # Problem 4 - Largest palindrome product
The solution here may not be the most efficient, but it works. The program loops through all 3-digit number products, converts them to a string, reverses the string, and then checks if the reversed and unreversed strings are equivalent.
Read Time: 1 min
Posted: April 23, 2023
CodingMathPythonRust
Project Euler # Problem 2 - Even Fibonacci numbers
If you understand how a Fibonacci sequence works, then the code below is understandable. The solution has been written in both Python and Rust, and either one will work.
Read Time: 1 min
Posted: April 3, 2023
CodingMathPythonRust
Project Euler # Problem 1 - Multiples of 3 and 5
We have to find all the multiples of 3 or 5 below 1000 and get the sum. One thing to be careful of are multiples of 15, as they are multiples of both 3 and 5, and we want multiples of 3 or 5.
Read Time: 1 min
Posted: March 28, 2023
CodingMathPythonRust