The exp() function in C++ returns the exponential (Euler’s number) e (or 2.71828) raised to the given argument. Syntax for returning exponential e: result=exp() Parameter:… Read More »
All Basic Articles
Given a Binary Matrix of size N X N, consisting of 1s and 0s. The task is to find the minimum flips required to make… Read More »
Given an array, the task is to find maximum triplet sum in the array. Examples: Input : arr[] = {1, 2, 3, 0, -1, 8,… Read More »
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 »
Morgan Stanley has been operating in India for over 20 years, providing a variety of services to domestic and international clients. The Firm has a… Read More »
Given a string and the task is to count vowels, consonant, digits and special character in string. Special character also contains the white space. Examples:… Read More »
Given a square matrix and the task is to check the matrix is in lower triangular form or not. A square matrix is called lower… Read More »
Given a tank with definite height and radius and the flow of water available to fill the tank. Determine whether the tank will overflow or… Read More »
In the early days, adding a video to a webpage was a real challenge since one had to convert the videos to different formats to… Read More »
Given co-ordinates (x, y), determine the quadrant of the cartesian plane. Image_source : wikipedia.org Examples : Input : x = 1, y = 1 Output… Read More »
Image Source : Wikimedia We have a new member in our programming languages family and it’s none other than Kotlin. In Google I/O ‘17, they… Read More »
Hello guys! I have been waiting for this time more than a year to post my TCS experience. Here I’m going to explain first four… Read More »
Given a number and to find first and last digit of a number. Examples: Input : 12345 Output : First digit: 1 last digit :… Read More »
A subarray is called alternating if any two consecutive numbers in it have opposite signs (i.e. one of them should be negative, whereas the other… Read More »
Three players P1, P2 and P3 are playing a game. But at a time only two players can play the game, so they decided, at… Read More »
Given the sequence of odd numbers 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, …. Find the sum of first n… Read More »
There are two players A and B who are interested in playing a game of numbers. In each move a player pick two distinct number,… Read More »
Given two arrays, the task is to calculate the product of max element of first array and min element of second array References : Asked… Read More »
You are given two co-ordinates (x1, y1) and (x2, y2) of a two dimensional graph. Find the distance between them. Examples: Input : x1, y1… Read More »
Given a string s (containing lowercase letters only), we have to find the minimum cost to construct the given string. The cost can determined using… Read More »

