# Category Archives: Algorithms

Given a Binary Tree where each node has a value of either 0 or 1, the task is to convert the given Binary tree toâ€¦ Read More
Given integers N and K, the task is to construct an array arr[] of size N using numbers in the range [1, N] such thatâ€¦ Read More
Given a large integer N, the task is to find the largest possible integer which is divisible by 9 after inserting exactly one digit fromâ€¦ Read More
Given an array arr that contains N positive Integers. Find the count of all possible pairs whose bit wise XOR value is greater than bitâ€¦ Read More
Given an array arr that contains N positive Integers. Find the count of all possible pairs whose bitwise XOR value is greater than bitwise ANDâ€¦ Read More
Given an array arr[] having N integers, and an integer K, the task is to find an array such that it contains a single elementsâ€¦ Read More
Given an array Arr[], the task is to find out the minimum number of operations to make the sum of array elements lesser or equalâ€¦ Read More
Given a tree of having N nodes rooted at node 0, and an array val[] denoting the value at each node, the task is toâ€¦ Read More
Given an array arr[] of size N, the task is to maximize the array sum by subtracting the absolute values of all odd and addingâ€¦ Read More
Given an integer N, find the number of natural numbers less than or equal to N and have 4 factors. Example:  Input: N = 8Output:â€¦ Read More
Given a binary array arr[] of size N and an integer K, the task is to find the highest index which can be reached inâ€¦ Read More
Given an array arr[] of size N, an integer K and Q queries, each of form {x, l, r}. For each query, the task isâ€¦ Read More
Given an integer N, the task is to generate an array arr[] having N positive integers such that arr[i] â‰  arr[j] if j is divisibleâ€¦ Read More
Given integers L and R, the task is to find the number of integers in range [L, R] (say X) which does not form aâ€¦ Read More
Given an array A[] of size N and a digit K. Find the number of sub-sequences of the array where the last digit of theâ€¦ Read More