Tag: optimization

Prime Number sieve in Scala

0 Comment

There are a number of sieve algorithms that can be used to list prime numbers up to a certain value.  I came up with this implementation in Scala. I rather like it, as it makes no use of division, modulus, and only one (explicit) multiplication. Despite being in Scala, it’s not in a functional style. It uses…

© All Right Reserved
Proudly powered by WordPress | Theme: Shree Clean by Canyon Themes.