Skip to content

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 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

Start Your Coding Journey Now!