Card image cap
C++ Program to find the factors of a number.

In this program we take an input n for which we will find the factors. Factors of a number n are those numbers which can completely divide the given number n.

Card image cap
C++ Program for Matrix Subtraction of same order

This C++ Program will show  the  subtraction of two matrices having same order. First program will initializes the matrices, subtracts each corresponding element of the two matrices and puts the value in the third matrix.

Card image cap
C++ program to add the two matrices

C++ Program to add the matrices is given below. Here we will first define the size of the input matrices and then will add the both matrices using 'add' method and will store their result in the third matrix

Card image cap
C++ Program to find the square root of Number in log(n)

The idea is simple. We will use binary search to find the square root of the number. If the given number is not a perfect square then we will simply take the floor value of the root of the number.

Card image cap
C++ Program to Generate all the Rotations of a String

We will discuss an easy approach to generate all the rotations of a string. Approach is simple we will concatenate the given string with itself and then we will be able to generate all the rotations. C++ Program to generate all the rotations of a given string is given below along with its algorithm.

Card image cap
C++ Program to find all the Peak Elements in Array

In this program an array is given to you and you have to find the peak elements in the array.. A peak element in the array is the element which is greater than its left and right elements. Therefore, There can be multiple peak elements in the array.

Card image cap
C++ Program to Reverse the Vowels of a String

C++ Program to reverse the vowels of a string is given below. Approach is simple, we will use two pointer approach. First we will initialize a counter at the start of the string and the other one is at the end of the string. Time complexity of the program given below is O(n) and space complexity is O(1).

Card image cap
Adding Reversed Number (ADDREV) in C++ - SPOJ
C++ Program for the adding reversed number problem of spoj is given below. The given solution is accepted by spoj judge.

PROGRAM:



Card image cap
Anti-Blot System (ABSYS) Program in C++ - Spoj
C++ Program for the anti-blot system problem of spoj is given below. The given solution is accepted by spoj judge.

PROGRAM:
 

Card image cap
C++ Program to find Maximum Product Subarray

In this question an array of positive and negative integers is given to you. You have to find the maximum product of subarray. C++ complete program to get the maximum product subarray is given below.