Factorial is a positive number which is the product of all number less than or equal to that positive number. For example: 0! = 1 1! = 1 2! = 2 * 1! = 2 3! = 3 * 2! = 6 … n! = n * (n – 1)! Here is the sample code
Category: Data structure & Algorithm
How to check Palindrome word using C#
Palindrome word can be read in both direction. Suppose “level” can be read in both direction, so it is palindrome word. To check palindrome word you can try like following code using C#. class Program { public static bool IsPalindrome(string word) { int minLength = 0; int maxLength = word.Length – 1; while (true) {