# Category Archives: School Programming

## Check if the concatenation of first N natural numbers is divisible by 3

Given an integer N, the task is to check if the concatenation of first N natural numbers is divisible by 3 or not. Print Yes… Read More »

## Area of a Square | Using Side, Diagonal and Perimeter

Given one of the Sides S, Diagonal D, or Perimeter P of the square, the task is to find the area of the square with… Read More »

## Largest lexicographic triplet from a given Array that forms a triangle

Given an array arr[], the task is to find the lexicographically largest triplet in that array that can form a triangle. If no such triplet… Read More »

## Program to print the pattern 1020304017018019020 **50607014015016 ****809012013 ******10011…

Given an integer N, the task is to print the below pattern for the given value of N.   For N = 5 Below is the… Read More »

## Subtraction of two large numbers using 10’s compliment

Given two strings str1 and str2 of given lengths N and M respectively, each representing a large number, the task is to subtract one from… Read More »

## Check if N leaves only distinct remainders on division by all values up to K

Given a two integers N and K, the task is to check if N leaves only distinct remainders when divided by all integers in the… Read More »

## Check if a right-angled triangle can be formed by the given coordinates

Given three Cartesian coordinates, the task is to check if a right-angled triangle can be formed by the given coordinates. If it is possible to… Read More »

## Check whether a given number is an ugly number or not

Given an integer N, the task is to find out whether the given number is an Ugly number or not .  Ugly numbers are numbers… Read More »

## Subtraction of two large numbers using 9’s compliment

Given two strings str1 and str2 of given lengths N and M respectively, each representing a large number, the task is to subtract one from… Read More »

## Maximum possible GCD for a pair of integers with product N

Given an integer N, the task is to find the maximum possible GCD among all pair of integers with product N.Examples:   Input: N=12 Output: 2 Explanation: All possible… Read More »

## Count of Missing Numbers in a sorted array

Given a sorted array arr[], the task is to calculate the number of missing numbers between the first and last element of the sorted array.… Read More »

## Find two numbers with given sum and maximum possible LCM

Given an integer X, the task is to find two integers A and B such that sum of these two numbers is X and the… Read More »

## Convert given Decimal number into an irreducible Fraction

Given a decimal number as N, the task is to convert N into an equivalent irreducible fraction. An irreducible fraction is a fraction in which… Read More »

## Missing vertex among N axis-parallel rectangles

Given N axis-parallel rectangles in a 2-D cartesian coordinate system and coordinates of 4N-1 vertices, the task is to find the single vertex missing.Examples: Input:… Read More »

## Menu-Driven program for Phone Directory

Problem Statement: Write a menu-driven program for using switch-case with following features: Store Contact numbers of people Search for the Contact numbers using their names… Read More »