## Queries for bitwise AND in the index range [L, R] of the given array

Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise AND of all… Read More »

- How can one become good at Data structures and Algorithms easily?
- 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
- Dijkstra's shortest path with minimum edges
- Shannon-Fano Algorithm for Data Compression
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- How to write a Pseudo Code?
- Sort the array of strings according to alphabetical order defined by another string
- Longest subsequence such that adjacent elements have at least one common digit
- Code Optimization Technique (logical AND and logical OR)
- Iterative Letter Combinations of a Phone Number
- Check if it is possible to reach a number by making jumps of two given length
- Smallest Pair Sum in an array
- Sum of similarities of string with all of its suffixes
- Dividing a Large file into Separate Modules in C/C++, Java and Python
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Ternary Search
- Find the number in a range having maximum product of the digits
- Count pairs in array whose sum is divisible by K
- Length of the longest alternating subarray
- Largest perfect square number in an Array
- Smallest power of 2 which is greater than or equal to sum of array elements
- Travelling Salesman Problem implementation using BackTracking
- Count common characters in two strings
- Count distinct substrings that contain some characters at most k times
- Number of array elements derivable from D after performing certain operations
- Find alphabet in a Matrix which has maximum number of stars around it
- Array Manipulation and Sum
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum

Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise AND of all… Read More »

Given an array arr[] of N integers. The integers represent all the divisors of a number X except 1 and X itself. The task is… Read More »

Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise OR of all… Read More »

Given a tree, and the weights of all the nodes, the task is to count the number of nodes whose weight is even. Examples: Input:… Read More »

Given a 2d-matrix mat[][] consisting of positive integers, the task is to find the minimum number of steps required to reach the end of the… Read More »

Given a tree, and the weights of all the nodes, the task is to count the number of nodes whose weight is prime. Examples: Input:… Read More »

Given a string str of lowercase alphabets, the task is to find all distinct palindromic sub-strings of the given string. Examples: Input: str = “abaaa”… Read More »

Given an integer array arr[] of size N and an integer K, the task is to find the index which will be the last to… Read More »

Given a perfect binary tree of N nodes, with nodes having values from 1 to N as depicted in the image below and Q queries… Read More »

Given a tree, and the weights of all the nodes, the task is to count the number of nodes whose weight is a perfect Square.… Read More »

Given an integer array arr[] of length N consisting of positive integers, the task is to minimize the number of steps required to reach the… Read More »

Given a tree, and the weights of all the nodes and an integer x, the task is to find a node i such that weight[i]… Read More »

Given a binary string str of length N and two integers A and B such that 0 ≤ A < B < n. The task… Read More »

Given a permutation P of first N natural numbers, the task is to count the index pairs (i, j) such that P[i] + P[j] =… Read More »

Given a tree, and the weights of all the nodes and an integer x, the task is to find a node i such that |weight[i]… Read More »