Given an array arr[] of digits and an integer K, the task is to find num(arr) + K where num(arr) is the number formed by… Read More »

Given a linked list, the task is to find the sum of all the nodes which are greater than the node next to them. Note… Read More »

Given two integers N and M. The task is to find the minimum number of steps to reach M from N by performing given operations.… Read More »

Given a sorted array arr[] of distinct elements which is rotated at some unknown point, the task is to find the maximum element in it.… Read More »

Given two arrays arr1[] and arr2[]. The task is to count the distinct sums that can be obtained while choosing a prime element from arr1[]… Read More »

Given a linked list, the task is to find the sum of even and odd nodes in it separately. Examples: Input: 1 -> 2 ->… Read More »

Given an array arr[] of size n where arr[i] is the amount of candies of type i. You have unlimited amount of money. The task… Read More »

Given a binary tree, write a function that returns true if the tree satisfies below property: For every node, data value must be equal to… Read More »

Given an array arr[] of n integers and an integer k. The task is to maximize the sum of the array after performing the given… Read More »

Given the NxN grid of horizontal and vertical roads. The task is to find out the number of ways that the person can go from… Read More »

Given an array, the task is to print or display all the permutations of this array using STL in C++. Examples: Input: a[] = {1,… Read More »

Given a Binary tree, the task is to count the number of nodes with two children at a given level L. Examples: Input: 1 /… Read More »

Given the count of digits 1, 2, 3, 4. Using these digits you are allowed to only form numbers 234 and 12. The task is… Read More »

Given an array of n integers, we have to partition the array into three segments such that all the segments have equal sum. Segment sum… Read More »

Given an array arr[], sort this array in descending order using STL in C++. Example: Input: arr[] = {1, 45, 54, 71, 76, 12} Output:… Read More »

Given a vector, find the sum of the elements of this vector using STL in C++. Example: Input: vec = {1, 45, 54, 71, 76,… Read More »

Given an array arr[] of N unique elements and Q queries. Every query consists of two integers L and R. The task is to print… Read More »

Given two integers A and B, the task is to calculate 22A % B. Examples: Input: A = 3, B = 5 Output: 1 223… Read More »

Given an array arr[] of size N and an integer K, the task is to find the smallest index in the array such that: floor(arr[i]… Read More »

Q.1. What is Regression ? What is Classification ? Ans. Regression : Target variable continous. Classification : Target variable is discrete Q.2. What are the… Read More »