Math

General Mathematics questions

Count all prime numbers

[Question] Count all prime numbers from given nExample Input: n = 10Output: 4Explanation: There are 4 prime numbers less than 10, they are 2, 3, 5, 7.Solution: using Sieve of Eratosthenes AlgoThe Sieve of Eratosthenes is an ancient and efficient algorithm for finding all prime numbers up to a specified integer \( n \). It …

Count all prime numbers Read More »

Logarithms Explained

In this article I will explain about how log values is being calculated Remember Log 2 8 = 3 which means 2 3 = 8 Example 2 Log 10 1000 = 4 which means 10 4 = 10,000