Largest odd divisor Game to check which player wins
Two players are playing a game starting with a number n. In each turn, a player can make any one of the subsequent moves: Divide… Read More »
Two players are playing a game starting with a number n. In each turn, a player can make any one of the subsequent moves: Divide… Read More »
Given a Binary Tree, the task is to print the nodes that have grandchildren. Examples: Input: Output: 20 8 Explanation: 20 and 8 are the… Read More »
Given two nodes of a binary tree v1 and v2, the task is to check if two nodes are on the same path in a… Read More »
Given a number N, the task is to find the number of quadraples such that a2 + b2 = c2 + d2 where (1 <=… Read More »
Given an array arr[] of N positive integers and a number K, the task is to find the maximum value of bitwise OR of the… Read More »
Given a positive integer N, the task is to find the sum of divisors of all the numbers from 1 to N. Examples: Input: N… Read More »
Given an array arr[] of positive integers. The task is to reverse a subarray to minimize the sum of elements at even places and print… Read More »
Given two integers N and K, the task is to count the numbers up to N digits such that no two zeros are adjacents and… Read More »
Given an integer N, the task is to count the number of square-free divisors of the given number. A number is said to be square-free,… Read More »
Given an array arr[] of N numbers. We can merge two adjacent numbers into one and the cost of merging the two numbers is equal… Read More »
Given a positive integer N, the task is to find the largest integer M such that 0 <= M < N and XOR(M, N) is… Read More »
Given an array arr[] consisting of N integers, the task is to to modify the array such that arr[index] = index using minimum number of… Read More »
Given an integer K and an array arr[] of N integers, each of which is the first term and common difference of an Arithemetic Progression,… Read More »
Given a string S of length N, consisting of only opening ‘(‘ and closing ‘)‘ parenthesis. The task is to find all indices ‘K‘ such… Read More »
Given two arrays a[] and b[], both of size N. The task is to count the number of distinct pairs such that (a[i] + a[j]… Read More »