The simplest solution to this problem is to list all prime factors, sort, reverse and print the first value in the list.

The third Project Euler problem - Largest Prime Factor - is stated as follows. What is the largest prime factor of the number 600851475143?

```
let getPrimeFactors = (num) => {
let rec next = (num, i, res) =>
switch (num > 1, num mod i === 0) {
| (true, true) => next(num / i, 2, [i, ...res])
| (true, false) => next(num, i + 1, res)
| _ => res
};
next(num, 2, [])
};
getPrimeFactors(600851475143)
|> List.sort(compare)
|> List.rev
|> List.hd
|> print_int;
```

- [animation] Unknown Pleasures
- [tech-test] What is a binary tree and how to invert it using Kotlin
- [project-euler] Find Highly Divisible Triangular Numbers with Kotlin
- [project-euler] Find the Largest Product in a Grid with Rust
- [project-euler] Summation of the First Two Million Primes with Rust
- [project-euler] Finding the largest product in a series with Rust
- [project-euler] Finding the 10001st prime with Rust
- [js] The complete list of rational numbers with Stern-Brocot and Javascript
- [project-euler] Project Euler number six solved with Rust
- [project-euler] Smallest positive number that is evenly divisible by all of the numbers from 1 to 20 with Rust
- [project-euler] Finding the largest palindrome product with Rust
- [project-euler] Get the largest prime factor with Reason
- [project-euler] Find the sum of all even Fibonacci numbers below four million with OCaml
- [project-euler] Finding the sum of all multiples of 3 or 5 below 1000 with OCaml
- [project-euler] Special Pythagorean Triplet solved with Reason
- [personal] New Year's Resolution 2018