## Number of bitonic arrays of length n and consisting of elements from 1 to n

For a given number n (n > 1), we need to find the number of ways you can make bitonic array of length n, consisting… Read More »

For a given number n (n > 1), we need to find the number of ways you can make bitonic array of length n, consisting… Read More »

You are given a 2D grid of values 0 or 1, where each 1 marks the home of someone in a group. And the group… Read More »

Given a number n as input, we need to print its table. Examples: EXAMPLE1: Input : 5 Output :5 * 1 = 5 5 *… Read More »

Given a grid of size n x len filled with lowercase characters. We can swap two adjacent characters in the same row and column. Now… Read More »

Find the binary equivalent of the given non-negative number n without using arithmetic operators. Examples: Input : n = 10 Output : 1010 Input :… Read More »

Given three points, check whether they lie on a straight (collinear) or not Examples: Input : (1, 1), (1, 4), (1, 5) Output : Yes… Read More »

Given two times in string “HH:MM” format. Here ‘H’ shows hours and ‘M’ shows minutes. You have to find the difference in same string format… Read More »

Introduction The Ulam spiral is a graphical depiction of the set of prime numbers, devised by mathematician Stanislaw Ulam. It is constructed by writing the… Read More »

A neon number is a number where the sum of digits of square of the number is equal to the number. The task is to… Read More »

Given four points of a rectangle, and one more point P. Write a function to check whether P lies within the given rectangle or not.… Read More »

We are given a N*M grid, print the number of rectangles in it. Examples: Input : N = 2, M = 2 Output : 9… Read More »

Given an array where elements are first continuously increasing and after that its continuously decreasing unit first number is reached again. We want to add… Read More »

Given a simple weighting scale with two pans, we are given a weight T and some other weights which are the powers of a specific… Read More »

In graph theory, the Erdos–Rényi model is either of two closely related models for generating random graphs. There are two closely related variants of the… Read More »

Given a number n, our task is to find all 1 to n bit numbers with no consecutive 1s in their binary representation. Examples:- Input… Read More »