# Category Archives: Aptitude

## Length of race track based on the final distance between participants

Given three integers A, B and C, the task is to find the length of a race track if 3 racers are competing in a… Read More »

## Average of Cubes of first N natural numbers

Given a positive integer N, the task is to find the average of cubes of first N natural numbers. Examples:   Input: N = 2 Output: 4.5 Explanation: For integer… Read More »

## Construct an Array such that cube sum of all element is a perfect square

Given the size of array N, the task is to construct an array of size N with positive integer elements such that the cube sum… Read More »

## Count of elements in first Array greater than second Array with each element considered only once

Given two sorted array of size N. The task is to find the maximum number of elements in the first array which are strictly greater… Read More »

## Find N values of X1, X2, … Xn such that X1 < X2 < … < XN and sin(X1) < sin(X2) < … < sin(XN)

Given a number N, the task is to find the N integer values of Xi such that X1 < X2 < … < XN and… Read More »

## Program to find Surface Area and Volume of Octagonal Prism

Given the base length, height, and distance of Octagonal Prism we have to find the Surface Area and Volume of the octagonal prism for the… Read More »

## Generate a string of size N whose each substring of size M has exactly K distinct characters

Given 3 positive integers N, M and K. the task is to construct a string of length N consisting of lowercase letters such that each… Read More »

## Maximum GCD of all subarrays of length at least 2

Given an array arr[] of N numbers. The task is to find the maximum GCD of all subarrays of size greater than 1. Examples: Input:… Read More »

## Area of circle inscribed in a Isosceles Trapezoid

Given two bases of the isoceles trapezoid ABCD as a and b, the task is to find the area of circle inscribed in this trapezoid… Read More »

## Square Difference of Two large Consecutive Numbers

Given two positive consecutive numbers M and N, the task is to find the square difference of the two numbers without computing the square of… Read More »

## Find the percentage change in the area of a Rectangle

Given two integers P and Q which represents the percentage change in the length and breadth of the rectangle, the task is to print the… Read More »

## Check if a number is divisible by 47 or not

Given a number N, the task is to check whether the number is divisible by 47 or not. Examples: Input: N = 1645 Output: yes… Read More »

## Check if a number is divisible by 31 or not

Given a number N, the task is to check whether the number is divisible by 31 or not. Examples: Input: N = 1922 Output: Yes… Read More »

## Check if the number is divisible 43 or not

Given a number N, the task is to check whether the number is divisible by 43 or not. Examples: Input: N = 2795 Output: yes… Read More »

## Check if the given number is divisible by 71 or not

Given a number N, the task is to check whether the number is divisible by 71 or not. Examples: Input: N = 25411681 Output: yes… Read More »