## Sum of XOR of all subarrays

Given an array containing N positive integers, the task is to find the sum of XOR of all sub-arrays of the array. Examples: Input :… Read More »

- What is Competitive Programming and How to Prepare for It?
- Check which player visits more number of Nodes
- Make the list non-decreasing by changing only one digit of the elements
- Nth XOR Fibonacci number
- Write a function to get the intersection point of two Linked Lists | Set 2
- Number of substrings that start with "geeks" and end with "for"
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Reversing a Queue using another Queue
- Minimum increment or decrement operations required to make the array sorted
- Check if the rows of a binary matrix can be made unique by removing a single column
- Number of Subarrays with positive product
- Queries for the minimum element in an array excluding the given index range
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Color all boxes in line such that every M consecutive boxes are unique
- Print nodes having maximum and minimum degrees
- Minimize the sum of the array according the given condition
- Count of triples (A, B, C) where A*C is greater than B*B
- Find two co-prime integers such that the first divides A and the second divides B
- Sum of all natural numbers from L to R ( for large values of L and R )
- Largest sub-matrix with all equal elements
- Minimize the cost of partitioning an array into K groups
- Maximum length sub-array which satisfies the given conditions
- Find out the prime numbers in the form of A+nB or B+nA
- Check if the Matrix satisfies the given conditions
- Find a pair (n,r) in an integer array such that value of nCr is maximum
- Java | Handling TLE While Using Arrays.sort() Function
- Count of Multiples of A ,B or C less than or equal to N
- Sort elements by modulo with K

Given an array containing N positive integers, the task is to find the sum of XOR of all sub-arrays of the array. Examples: Input :… Read More »

Given an array arr[] of integers and an integer pos, the task is to find the minimum index i such that all the elements from… Read More »

Given the source point and the destination point of the path and two integers x and y. The task is to check whether it is… Read More »

Given an array arr[], the task is to find the maximum length of a subsequence such that the adjacent elements in the subsequence have a… Read More »

Given N strings of equal lengths. The strings contain only digits (1 to 9). The task is to count the number of strings that have… Read More »

A useful application of Pascal’s triangle is the calculation of combinations. The formula to find nCr is n! / r! * (n – r)! which… Read More »

Given an integer N, the task is to count all possible N digit numbers such that A + reverse(A) = 10N – 1 where A… Read More »

Given an array arr[] and an integer k, we can cut this array at k different positions where k[] stores the positions of all the… Read More »

Given the position of a Bishop on an 8 * 8 chessboard, the task is to count the total number of squares that can be… Read More »

Given an array arr[] of integers, two players A and B are playing a game where A can remove any number of non-zero elements from… Read More »

Given two numbers and . Find the values of X and Y in the equations. A = X + Y B = X xor Y… Read More »

Given two numbers A and B ( A and B can be up to 106 ) which forms a number N = (A!/B!). The task… Read More »

Given a keypad of a mobile, and keys that need to be pressed, the task is to print all the words which are possible to… Read More »

Given N intervals of the form of [l, r], the task is to find the intersection of all the intervals. An intersection is an interval… Read More »

Given side of a square n and two points (x1, y1) and (x2, y2) on the boundaries of the given square. The task is to… Read More »