Program to make Indian Flag in Python | Step by Step

Here, We’ll be making Indian Flag in Python using Spyder tool which is a part of Anaconda interface. It is the beginner’s practice problem for… Read More »

Count changes in Led Lights to display digits one by one

Given a number n. Count the number of changes in LED light when display one after another of a given number. (Initially all LED is… Read More »

Find if a molecule can be formed from 3 atoms using their valence numbers

Valence number of an atom is defined as the exact number of bonds the atom must form with other atoms. Given valence number of 3… Read More »

Printing all subsets of {1,2,3,…n} without using array or loop

Given a natural number n, print all the subsets of the set without using any array or loop (only the use of recursion is allowed).… Read More »

Check if the given chessboard is valid or not

Given a NXN chessboard. The task is to check if the given chessboard is valid or not. A chess board is considered valid if every… Read More »

Minimum queens required to cover all the squares of a chess board

Given the dimension of a chess board (N x M), determine the minimum number of queens required to cover all the squares of the board.… Read More »

Eggs dropping puzzle (Binomial Coefficient and Binary Search Solution)

Given n eggs and k floors, find the minimum number of trials needed in worst case to find the floor below which all floors are… Read More »

Increment a number without using ++ or +

The task is to Increment a number without using ++ and + operators. Examples: Input : 3 Output : 4 Input : 9 Output :… Read More »

Josephus Problem | (Iterative Solution)

There are N Children are seated on N chairs arranged around a circle. The chairs are numbered from 1 to N. The game starts going… Read More »

Why are negative numbers stored as 2’s complement?

When doing addition/subtraction on binary numbers in other representations we need to apply different logics (circuits) to perform addition and subtraction. In 2s-complement representation, we… Read More »

Egg Dropping Puzzle with 2 Eggs and K Floors

Given 2 eggs and k floors, find the minimum number of trials needed in worst case. This problem is a specific case of n eggs… Read More »

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 »

Partition negative and positive without comparison with 0

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 »

Optimal Storage on Tapes

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 »

Solve the Crossword Puzzle

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 »