## Minimum absolute difference between N and a power of 2

Given an integer N, the task is to find the minimum absolute difference between N and a power of 2. Examples: Input: N = 4… Read More »

- Practice for cracking any coding interview
- How to get rid of Java TLE problem
- How can one become good at Data structures and Algorithms easily?
- Burst Balloon to maximize coins
- Subset array sum by generating all the subsets
- Understanding The Coin Change Problem With Dynamic Programming
- Sum of similarities of string with all of its suffixes
- Reach the numbers by making jumps of two given lengths
- Find triplets in an array whose AND is maximum
- Maximize the total profit of all the persons
- Length of the longest Subarray with only Even Elements
- Print matrix in snake pattern from the last column
- Check if a number is perfect square without finding square root
- Sort the array of strings according to alphabetical order defined by another string
- Number of quadrilaterals possible from the given points
- Introduction to Programming Languages
- How to read Competitive Programming Questions?
- Minimum number of increasing subsequences
- How can competitive programming help you get a job?
- Some useful C++ tricks for beginners in Competitive Programming
- Python in Competitive Programming
- Sum of the first N Prime numbers
- Sum of the multiples of two numbers below N
- Check if any permutation of a large number is divisible by 8
- Number of array elements derivable from D after performing certain operations
- Minimum cost to buy N kilograms of sweet for M persons
- Number of elements greater than K in the range L to R using Fenwick Tree (Offline queries)
- Smallest Pair Sum in an array
- Minimum cost path from source node to destination node via an intermediate node
- Kth Smallest sum of continuous subarrays of positive numbers

Given an integer N, the task is to find the minimum absolute difference between N and a power of 2. Examples: Input: N = 4… Read More »

Given an encrypted string str, the task is to decrypt the given string when the encryption rules are as follows: Start with the first character… Read More »

Given a string str, the task is to print all the sub-sequences of str. A subsequence is a sequence that can be derived from another… Read More »

Given two integers n and k, the task is to find whether it is possible to represent n as the sum of exactly k powers… 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 »

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 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 N numbers and two numbers L and R., the task is to print the count of numbers in the range [L, R] which are… Read More »

Given two numbers N and K. The task is to print K numbers which are powers of 2 and their sum is N. Print -1… Read More »

You have an unlimited number of 10-rupee coins and exactly one coin of r rupee and you need to buy minimum items each of cost… Read More »

Given a range represented by two positive integers l and r and two integers d and m. Find the count of numbers lying in the… Read More »

Given an array arr[] of size n ≥ 3, the task is to find the minimum possible difference between the the maximum and the minimum… Read More »

Given a graph G, the task is to check if it represents a Star Topology. A Star Topology is the one shown in the image… Read More »

Given a graph G, the task is to check if it represents a Ring Topology. A Ring Topology is the one shown in the image… Read More »