# Category Archives: School Programming

## Check whether count of odd and even factors of a number are equal

Given a number N, the task is to find whether N has an equal number of odd and even factors. Examples: Input: N = 10… Read More »

## Count of ways to make Array sum even by removing only one element

Given an array arr[] positive integers, the task is to find the number of ways to convert the array sum even if we are allowed… Read More »

## Find the ratio of LCM to GCD of a given Array

Given an array arr[] of positive integers, the task is to find the ratio of LCM and GCD of the given array. Examples: Input: arr[]… Read More »

## Maximum absolute difference between distinct elements in an Array

Given an array arr[] of N integers, the task is to find the maximum absolute difference between distinct elements of the array. Examples: Input: arr[]… Read More »

## Arrange numbers 1 to N^2 in a Zig-Zag Matrix in ascending order

Given a positive integer N, the task is to print an N × N zig-zag matrix consisting of numbers from 1 to N2, such that… Read More »

## What is Indentation, Documentation and Program Maintenance?

Indentation improves the readability of the code. It is mainly used for code inside looping statements, control structures, functions etc. as good intended code is… Read More »

## Minimum swaps required to move all vowels occurs after consonants in a given string

Given a string S, the task is to count the number of positions by which the vowels have to be moved such that all the… Read More »

## Area of a Triangle from the given lengths of medians

Given three integers A,B and C which denotes length of the three medians of a triangle, the task is to calculate the area of the… Read More »

## Product of Complex Numbers using three Multiplication Operation

Given four integers a, b, c, and d which represents two complex numbers of the form (a + bi) and (c + di), the task… Read More »

## Find the concentration of a solution using given Mass and Volume

Given two values M and V representing the mass of solute and volume of a solution, the task is to calculate the concentration of the… Read More »

## Check whether the binary equivalent of a number ends with given string or not

Given a positive integer N, the task is to check whether the binary equivalent of that integer ends with a given string str or not. Print… Read More »

## How to calculate the Easter date for a given year using Gauss’ Algorithm

Given an integer Y, denoting a year, as input, the task is to find the date of Easter for that year. Examples: Input: Y =… Read More »

## Check if Matrix sum is prime or not

Given a matrix mat[][], the task is to check that the sum of the elements of the matrix is prime or not. Examples: Input: mat[][]… Read More »

## Place Value of a given digit in a number

Place value can be defined as the value represented by a digit in a number on the basis of its position in the number. Here… Read More »

## Smallest number greater than or equal to N using only digits 1 to K

Given a number N and an integer K, the task is to find the smallest number greater than or equal to N, formed using only… Read More »