Count the number of even/odd results after performing a series of calculation on a range of numbers. Given that: Each layer of calculation have two numbers (say a and b) associated with ...read more
DSA
7 postsGiven a binary tree and two nodes a and b, the task is to print the maximum node value that lies in the path connecting the nodes a and b. If either ...read more
Given an integer array arr[], the task is to find the number of triplets at distinct indices that can be removed from the array such that the mean remains the same as ...read more
Given a non negative number, you are required to find whether or not the number can be composed from sum of some number of 7s, 5s and 3s i.e. if a number ...read more
Given a positive integer N, the task is to construct an array of length N and maximize the value at index K such that the sum of all the array elements is ...read more
In this article, we will discuss some of similar questions that are easy to solve with few changes in solution codes. Leetcode is a platform to practice DSA problems for those who ...read more
Given an integer array arr[] a non negative integer k, print k-th distinct element in an array. The given array may contain duplicates and the output should print k-th distinct element among ...read more