# Tag Archives: school-programming

## Find indices of all local maxima and local minima in an Array

Given an array arr[] of integers. The task is to find the indices of all local minima and local maxima in the given array.Examples: Input:… Read More »

## Smallest number greater than Y with sum of digits equal to X

Given two integers X and Y, find the minimal number with the sum of digits X, which is strictly greater than Y. Examples: Input: X… Read More »

## Divide N into K parts in the form (X, 2X, … , KX) for some value of X

Given a positive integer N and K, the task is to divide N into K parts such that the first part has a value X,… Read More »

## Angle between a Pair of Lines in 3D

Given coordinates of three points A(x1, y1, z1), B(x2, y2, z2) and C(x3, y3, z3) in a 3D plane, where B is the intersection point… Read More »

## Program to Print K using Alphabets

Given a number n, the task is to print ‘K’ using alphabets. Examples: Input: n = 5 Output: A B C D E F A… Read More »

## Count of integral coordinates that lies inside a Square

Given lower left and upper right coordinates (x1, y1) and (x2, y2) of a square, the task is to count the number of integral coordinates… Read More »

## Identical Splitting in a rectangular grid

Given a rectangular grid NxM dimensions, the task is to find the minimum number of cuts required to break the given rectangular grid into a… Read More »

## Program to print window pattern

Print the pattern in which there is a hollow square and plus sign inside it. Pattern will be as per the n i.e. number of… Read More »

## Difference between Keyword and Identifier

Keywords: Keywords are specific reserved words in C each of which has a specific feature associated with it. Almost all of the words which help… Read More »

## Height of Pyramid formed with given Rectangular Box

Given an array of rectangular blocks with dimensions {l, b} of length m. we can shape each of rectangular blocks into a single square block… Read More »

## Print the frequency of each character in Alphabetical order

Given a string str, the task is to print the frequency of each of the characters of str in alphabetical order. Example: Input: str =… Read More »

## Maximum number of line intersections formed through intersection of N planes

Given N planes. The task is to find the maximum number of line intersections that can be formed through the intersections of N planes. Examples:… Read More »

## Find the character made by adding all the characters of the given string

Given a string str consisting of lowercase English alphabets. The task is to add all the character values i.e. ‘a’ = 1, ‘b’ = 2,… Read More »

## Generate an array having Bitwise AND of the previous and the next element

Given an array of integers arr[] of N elements, the task is to generate another array having (Bitwise) AND of previous and next elements with… Read More »

## Find the first N integers such that the sum of their digits is equal to 10

Given an integer N, the task is to print first N integers whose sum of digits is 10. Examples: Input: N = 4 Output: 19… Read More »