# Category Archives: Mathematical (adsbygoogle = window.adsbygoogle || []).push({});

## Ratio of the distance between the centers of the circles and the point of intersection of two direct common tangents to the circles

Given two circles of given radii, such that the circles don’t touch each other, the task is to find the ratio of the distance between… Read More »

## Smallest multiple of N formed using the given set of digits

Given a set of digits S and an integer N, the task is to find the smallest positive integer if exists which contains only the… Read More »

## Choose X such that (A xor X) + (B xor X) is minimized

Given two integers A and B. The task is to choose an integer X such that (A xor X) + (B xor X) is minimum… Read More »

## Check if the robot is within the bounds of the grid after given moves

Given a grid of size N X M and a robot is placed at cell (N – 1, M – 1). Also, given string str… Read More »

## Check for balanced parentheses in an expression | O(1) space | O(N^2) time complexity

Given a string str containing characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, the task is to determine if brackets are balanced or not. Brackets… Read More »

## Length of the transverse common tangent between the two non intersecting circles

Given two circles of given radii, having there centres a given distance apart, such that the circles don’t touch each other. The task is to… Read More »

## Compare sum of first N-1 elements to Nth element of an array

Given an array arr[] of size N, the task is to check whether the sum of first N – 1 element of the array is… Read More »

## Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array

Given two arrays A and B of N integers. Reorder the elements of B in itself in such a way that the sequence formed by… Read More »

## Count number of subsets whose median is also present in the same subset

Given an array arr[] of size N, the task is to count the number of ways we can select a subset from the given array… Read More »

## Find sub-arrays from given two arrays such that they have equal sum

Given two arrays A[] and B[] of equal sizes i.e. N containing integers from 1 to N. The task is to find sub-arrays from the… Read More »

## Find an index such that difference between product of elements before and after it is minimum

Given an integer arr[], the task is to find an index such that the difference between the product of elements up to that index and… Read More »

## Area of plot remaining at the end

Given two integers N and M that represent the length and breadth of a rectangular plot and another integer K that represent the number of… Read More »

## Find permutation of first N natural numbers that satisfies the given condition

Given two integer N and K, the task is to find the permutation P of first N natural numbers such that there are exactly K… Read More »

## Largest even number that can be formed by any number of swaps

Given an integer N in the form of string, the task is to find the largest even number from the given number when you are… Read More »

## Count number of 1s in the array after N moves

Given an array of size N in which initially all the elements are 0(zero). The task is to count the number of 1’s in the… Read More »