## Occurrences of a pattern in binary representation of a number

Given a string pat and an integer N, the task is to find the number of occurrences of the pattern pat in binary representation of… Read More »

- How can one become good at Data structures and Algorithms easily?
- Find maximum in a stack in O(1) time and O(1) extra space
- Cracking Technical Interviews
- Print the nodes of binary tree as they become the leaf node
- Reach the numbers by making jumps of two given lengths
- Lower and Upper Bound Theory
- Shannon-Fano Algorithm for Data Compression
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Dijkstra's shortest path with minimum edges
- Sort the array of strings according to alphabetical order defined by another string
- Sum of similarities of string with all of its suffixes
- How to write a Pseudo Code?
- Check if it is possible to reach a number by making jumps of two given length
- Code Optimization Technique (logical AND and logical OR)
- Dividing a Large file into Separate Modules in C/C++, Java and Python
- Find the number in a range having maximum product of the digits
- Smallest power of 2 which is greater than or equal to sum of array elements
- Iterative Letter Combinations of a Phone Number
- Ternary Search
- Program to print the Zigzag pattern
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Largest perfect square number in an Array
- Length of the longest alternating subarray
- Smallest Pair Sum in an array
- Number of array elements derivable from D after performing certain operations
- Count distinct substrings that contain some characters at most k times
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Jump Pointer Algorithm
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Find alphabet in a Matrix which has maximum number of stars around it

Given a string pat and an integer N, the task is to find the number of occurrences of the pattern pat in binary representation of… Read More »

In a given Cartesian plane, there are N points. The task is to find the Number of Pairs of points(A, B) such that Point A… Read More »

Given an array of 2 * n elements, the task is to construct and print an array of n element such that the mean of… Read More »

Given an array consisting of N positive integer numbers. The task is to remove exactly one element from this array to minimize max(a) – min(a)… Read More »

Given an array of N numbers where values of the array represent memory sizes. The memory that is required by the system can only be… Read More »

Given two integers a and b, the task is to add them to get c. After that remove zeroes from a, b and c and… Read More »

We need to check whether a number is a perfect square or not without finding its square root. Examples: Input : n = 36 Output… Read More »

Given a positive integer N, the task is to check if N is a strong prime or not. In number theory, a strong prime is… Read More »

Given coordinates of 3 cells (X1, Y1), (X2, Y2) and (X3, Y3) of a matrix. The task is to find the minimum path which connects… Read More »

Given an array of integers arr[], the task is to find all the values for sum such that for a value sum[i] the array can… Read More »

Given a range represented by two positive integers L and R. Find the number lying in the range having the maximum product of the digits.… Read More »

Given a positive integer . Find the number of steps required to minimize it to 1. In a single step N either got reduced to… Read More »

Given a binary number as string, find its decimal equivalent. Examples: Input : binary = “101” Output : 5 Input : binary = “1111” Output… Read More »

Given a regular polygon of N sides with radius(distance from the center to any vertex) R. The task is to find the area of the… Read More »

Given a regular polygon of N sides with side length a. The task is to find the area of the polygon. Examples: Input : N… Read More »