## Check if two numbers are bit rotations of each other or notJune 11, 2017

Given two positive integers x and y, check if one integer is obtained by rotating bits of other. Input constraint: 0 < x, y <… Read More »

## Minimum sum of squares of character counts in a given string after removing k charactersJune 10, 2017

Given a string of lowercase alphabets and a number k, the task is to print the minimum value of the string after removal of ‘k’… Read More »

## Largest Subset with GCD 1

Given n integers, we need to find size of the largest subset with GCD equal to 1. Input Constraint : n <= 10^5 A[i] <=… Read More »

## Count the number of ways to tile the floor of size n x m using 1 x m size tiles

Given a floor of size n x m and tiles of size 1 x m. The problem is to count the number of ways to… Read More »

## Find other two sides of a right angle triangle

Given one side of right angle triangle, check if there exist a right angle triangle possible with any other two sides of the triangle. If… Read More »

## For-each loop in Java

Prerequisite: Decision making in Java For-each is another array traversing technique like for loop, while loop, do-while loop introduced in Java5. It starts with the… Read More »

## MongoDB and Python

Prerequisite : MongoDB : An introduction MongoDB is a cross-platform, document oriented database that works on the concept of collections and documents. MongoDB offers high… Read More »

## Maximum Length Bitonic Subarray | Set 2 (O(n) time and O(1) Space)

Given an array A[0 … n-1] containing n positive integers, a subarray A[i … j] is bitonic if there is a k with i <… Read More »

## Sum of product of all pairs of array elements

Given an array A[] of integers find sum of product of all pairs of array elements i. e., we need to find of product after… Read More »

## Write a function to check whether the length of given linklist is Even or Odd

Given a linklist, task is to make a function which check whether the length of linklist is even or odd. Examples: Input : 1->2->3->4->NULL Output… Read More »

## std::gcd | C++ inbuilt function for finding GCD

In many competitive programming problems, we need to find greatest common divisor also known as gcd. Euclids algorithm to find gcd has been discussed here… Read More »

## Convert C/C++ code to assembly language

We use g++ compiler to turn provided C code into assembly language. To see the assembly code generated by the C compiler, we can use… Read More »

## Print a given matrix in reverse spiral form

Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More »