## Subtract 1 without arithmetic operators

Write a program to subtract one from a given number. The use of operators like ‘+’, ‘-‘, ‘*’, ‘/’, ‘++’, ‘–‘ …etc are not allowed.… Read More »

Write a program to subtract one from a given number. The use of operators like ‘+’, ‘-‘, ‘*’, ‘/’, ‘++’, ‘–‘ …etc are not allowed.… Read More »

Given an array of n integers, both negative and positive, partition them into two different arrays without comparing any element with 0. Examples: Input :… Read More »

Given programs stored on a computer tape and length of each program is where , find the order in which the programs should be stored… Read More »

A 10 x 10 Crossword grid is provided, along with a set of words (or names of places) which need to be filled into the… Read More »

Print the Fibonacci sequence. The first Fibonacci numbers are: Output: 0 1 1 2 3 5 8 13 21 34 How to print using 2… Read More »

Suppose we have four variables a, b, c, d and we want to perform swapping of these variables in the following manner a = b,… Read More »

Design a data structure which can do following operations add() in O(n) getMinimum() in O(1) deleteMinimum() in O(1) Source : MakeMyTrip Interview. Recommended: Please try… Read More »

Given starting and ending position and a number N. Given that we are allowed to move in only four directions as shown in the image… Read More »

Place the numbers 1, 2, 3, 4, 5, 6, 7, 8 into the eight circles in the figure given below, in such a way that… Read More »

A Pythagorean Triplet is a set of natural numbers such that a < b < c, for which a^2 + b^2 = c^2. For example,… Read More »

You are a poor person in an island. There is only one shop in this island, this shop is open on all days of the… Read More »

Given two integers N and D, Find a set of N integers such that difference between their product and sum is equal to D. Examples… Read More »

Given a room with square grids having ‘*’ and ‘.’ representing untidy and normal cells respectively. You need to find whether room can be cleaned… Read More »

Given n non-negative integers where each represents a point at coordinate . ‘ n ‘ vertical lines are drawn such that the two endpoints of… Read More »

Given an array of n elements.You can double or triple the elements in the array any number of times. After all the operations check whether… Read More »