Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C#4.0

GCD Simplified using lambda

5.00/5 (1 vote)
12 May 2011CPOL 6.7K  
Hello Steven,As FYI: recently I have published on CodeProject a short article (tip) on rather efficient implementation of GCD/LCM based on Euclid algorithm. They use iteration instead of recursion, because re-cursive algorithms in general and in this particular case are relatively...
Hello Steven,

As FYI: recently I have published on CodeProject a short article (tip) on rather efficient implementation of GCD/LCM based on Euclid algorithm. They use iteration instead of recursion, because re-cursive algorithms in general and in this particular case are relatively inefficient in both execution time and resource utilization comparing to the iterative ones (iterative loop).

Here is the link to the tip: Fast Integer Algorithms: Greatest Common Divisor and Least Common Multiple, .NET solution[^]

Kind regards,
Alex

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)