Any number which cannot be divisible by any other number except one and itself is called a prime number. In other words, any number which doesn't have more than 2 factors (1 and itself) is called a prime number. Examples: 2, 3, 11, 13, 19 and such For a given number n, we shall find out the total factors for the number and decide whether the number is a prime or not.

```
public static bool DoIsPrimeNumber(int n)
{
// fetch the factors for n
List<int> factors = DoGetFactors(n);
return factors.Count > 2 ? false : true;
}
```

**How it works:**

For a given number n, we'll find out all the factors and then see if the Count of the factors is more than 2 or not. If it is two we'll return it is a prime, since by definition a prime number can't have more than 2 factors.

Special Numbers Loops • Added 8 months ago

Find if the given number is a Perfect Number

Special Numbers
Loops

Find if the given number is a Palindrome

Special Numbers
Loops

Find if the given number is an Armstrong Number

Special Numbers
Loops

Find if the given number is a Perfect Square

Special Numbers
Loops

Find all the Fibonacci numbers for a given limit

Special Numbers
Loops

Compute and generate a compressed string for a given string containing repetitions

Loops
Strings

Find all possible natural numbers below a given limit such that a3+b3 = c3+d3

Loops

Find all the pairs in a given ordered set of numbers whose sum is equal to a given input sum

Loops

Find all the pairs in a given unordered set of numbers whose sum is equal to a given input sum

Loops

Sort the given unordered set of Binary digits

Loops
Sorting

Role-based Access Control in AWS - Assuming Roles and accessing via ASP.NET Core

AWS
ASP.NET Core

Top 10 LINQ methods we use in our everyday C# Development

C# Concepts

Implementing a Worker Service in ASP.NET Core

ASP.NET Core

Understanding Time Complexity and Big O notation in Algorithms

Algorithms

Creating ASP.NET Core Microservices in AWS using SAM and CloudFormation

AWS
ASP.NET Core