## Alternate sorting of Linked list

Given a linked list containing n nodes. The problem is to rearrange the nodes of the list in such a way that the data in… Read More »

Given a linked list containing n nodes. The problem is to rearrange the nodes of the list in such a way that the data in… Read More »

Given two integers a and b, find the smallest possible height such that a triangle of atleast area “a” and base “b” can be formed.… Read More »

Given slant height, height and radius of a cone, we have to calculate the volume and surface area of the cone. Cone : Cone is… Read More »

Fermat’s little theorem states that if p is a prime number, then for any integer a, the number a p – a is an integer… 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 »

Given n queries of the form range [L, R]. The task is to find the maximum difference between two prime numbers in the range for… 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 n, find x, y, z such that x, y, z satisfy the equation “2/n = 1/x + 1/y + 1/z” There are multiple x,… Read More »

Count the total number of ways or paths that exist between two vertices in a directed graph. These paths doesn’t contain a cycle, the simple… Read More »

Definition of Trapezoid : A Trapezoid is a convex quadrilateral with at least one pair of parallel sides. The parallel sides are called the bases… Read More »

Given n, no of elements in the series, find the summation of the series 1, 3, 6, 10….n. The series mainly represents triangular numbers. Examples:… Read More »

People in a group, are sitting in a row numbered from 1 to n. Every has been asked the same question, “How many people of… Read More »

Given a positive integer ‘n’ and query ‘q’. Print all the divisors of number ‘n’. Input: 6 Output: 1 2 3 6 Explanation Divisors of… Read More »

Consider a n*n matrix. Suppose each cell in the matrix has a value assigned. We can go from each cell in row i to a… Read More »

Given a non-negative number n. The problem is to unset the last m bits in the binary representation of n. Constraint: 1 <= m <=… Read More »