## Maximum triplet sum in array

Given an array, the task is to find maximum triplet sum in the array. Examples : Input : arr[] = {1, 2, 3, 0, -1,… Read More »

## Microsoft Interview Experience | Set 157 (On-Campus)

Microsoft visited our campus. Prior to that, about a month ago they had conducted an online coding test. The interview consisted of 3 f2f rounds.… Read More »

## log() function in C++

Log() function in C++ : The log() function in C++ returns the natural logarithm (base-e logarithm) of the argument passed in the parameter. Syntax for… Read More »

## Sum of all divisors from 1 to n

Given a positive integer n. Find the value of where function F(i) for number i be defined as sum of all divisors of ‘i‘. Examples… Read More »

## Count number of increasing subsequences of size k

Given an array arr[] containing n integers. The problem is to count number of increasing subsequences in the array of size k. Examples: Input :… Read More »

## Sum of the series 1 + (1+2) + (1+2+3) + (1+2+3+4) + …… + (1+2+3+4+…+n)

Given the value of n, we need to find the sum of the series where i-th term is sum of first i natural numbers. Examples… Read More »

## Minimum insertions to make a Co-prime array

Given an array of N elements, find the minimum number of insertions to convert the given array into a co-prime array. Print the resultant array… Read More »

## Check if given number is Emirp Number or not

An Emirp Number (prime spelled backwards) is a prime number that results in a different prime when its decimal digits are reversed. This definition excludes… Read More »

## Program to print reverse character bridge pattern

For a given value N, denoting the number of Charters starting from the A, print reverse character bridge pattern. Examples : Input : n =… Read More »

## Minimum number of points to be removed to get remaining points on one side of axis

We are given n points in a Cartesian plane. Our task is to find the minimum number of points that should be removed in order… Read More »

## Program for Binomial Coefficients table

Given an integer max, print Binomial Coefficients table that prints all binomial coefficients B(m, x) where m and x vary from 0 to max Example… Read More »

## Rearrange array such that even positioned are greater than odd

Given an array A of n elements, sort the array according to the following relations : , if i is even. , if i is… Read More »

## DBMS – File Organization | Set 4

Prerequisite – Hashing Data Structure In database management system, When we want to retrieve a particular data, It becomes very inefficient to search all the… Read More »

## Partition into two subarrays of lengths k and (N – k) such that the difference of sums is maximum

Given an array of non-negative integers of length N and an integer k. Partition the given array into two subarrays of length K and N… Read More »

## Program to generate random alphabets

Prerequisite : rand() and srand() Given all alphabets in a character array, print a string of random characters of given size. We will use rand()… Read More »