Problem Statement: Given a number, check if it is Armstrong Number or Not. Examples: Example 1: Input:153 Output: Yes, it

Continue reading# Category: Maths

## Sum of first N Natural Numbers

Problem statement: Given a number ‘N’, find out the sum of the first N natural numbers. Examples: Example 1: Input:

Continue reading## Check whether a number is positive or negative

Problem statement: Given a number n check whether it’s positive or negative. Examples: Example 1: Input: n=5 Output: Positive Example2:

Continue reading## Greatest of two numbers

Problem Statement: Given two numbers. Find the greatest of two numbers. Examples: Example 1: Input: 1 3 Output: 3 Explanation:

Continue reading## Check whether a given number is even or odd

Problem Statement: Given a number n, check whether a given number is even or odd. Examples: Example 1: Input: n=5

Continue reading## Check if given year is a leap year or not

In this post we will solve the problem “Check if given year is a leap year or not”. Problem Statement:

Continue reading## Implement Pow(x,n) | X raised to the power N

Problem Statement: Given a double x and integer n, calculate x raised to power n. Basically Implement pow(x, n). Examples:

Continue reading## Nth Root of a Number using Binary Search

Problem Statement: Given two numbers N and M, find the Nth root of M. The nth root of a number

Continue reading## Majority Elements(>N/3 times) | Find the elements that appears more than N/3 times in the array

Problem Statement: Given an array of N integers. Find the elements that appear more than N/3 times in the array.

Continue reading## Grid Unique Paths | Count paths from left-top to the right bottom of a matrix

Problem Statement: Given a matrix m X n, count paths from left-top to the right bottom of a matrix with

Continue reading