## Number of groups formed in a graph of friends

Given n friends and their friendship relations, find the total number of groups that exist. And the number of ways of new groups that can… Read More »

## Find the first, second and third minimum elements in an array

Find the first, second and third minimum elements in an array in O(n). Examples: Input : 9 4 12 6 Output : First min =… Read More »

## Given an array and three numbers, maximize (x * a[i]) + (y * a[j]) + (z * a[k])

Given an array of n integers, and three integers x, y and z. maximise the value of (x * a[i]) + (y * a[j]) +… Read More »

## Program to print a rectangle pattern

Given height h and width w, print a rectangular pattern as shown in example below. Examples: Input : h = 4, w = 5 Output… Read More »

## Python Program for compound interest

Compound Interest formula: Formula to calculate compound interest annually is given by: Compound Interest = P(1 + R/100)r Where, P is principle amount R is… Read More »

## Java Program for compound interest

Compound Interest formula: Formula to calculate compound interest annually is given by: Compound Interest = P(1 + R/100)r Where, P is principle amount R is… Read More »

## C Program for compound interest

Compound Interest formula: Formula to calculate compound interest annually is given by: Compound Interest = P(1 + R/100)r Where, P is principle amount R is… Read More »

## Program to find compound interest

What is ‘Compound interest’? Compound interest is the addition of interest to the principal sum of a loan or deposit, or in other words, interest… Read More »

## TCS Interview Experience | Set 16

TCS Recruitment process contains total 2 levels. Round 1: It’s a test of 90 mins which contains a) Verbal Ability ( Email writing – 10 mins)… Read More »

## Maximum even sum subsequence

Given a array of n positive and negative integers, find the subsequence with the maximum even sum and display that even sum. Examples: Input: arr[]… Read More »

## Tau – A Mathematical Constant

What is Tau? The constant is numerically equal to 2*pi (2 times pi), and with value approximately 6.28. The ratio equates to 2*C/D. Where C… Read More »

## Check if a given array is pairwise sorted or not

An array is considered pairwise sorted if each successive pair of numbers is in sorted (non-decreasing) order. In case of odd elements, last element is… Read More »

## Program for Variance and Standard Deviation of an array

Given an array, we need to calculate the variance and standard deviation of the elements of the array. Examples : Input : arr[] = [1,… Read More »

## Find single in an array of 2n+1 integer elements

Given an array with 2n+1 integers, n elements appear twice in arbitrary places in the array and a single integer appears only once somewhere inside.… Read More »

## Zoho On Campus Drive | Set 25 (Software Developer)

Zoho visited our college to recruit people for software developer role in September 2017. There are two types of packages offered. Round 1: Written Test… Read More »