## Traversal of tree with k jumps allowed between nodes of same height

Consider a tree with n nodes and root. You can jump from one node to any other node on the same height a maximum of… Read More »

Consider a tree with n nodes and root. You can jump from one node to any other node on the same height a maximum of… Read More »

Given an array of n-positive elements. Sub-array sum is defined as the sum of all elements of a particular sub-array, the task is to find… Read More »

Given n elements, write a program that prints the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[] = {3, 10,… Read More »

Given N elements, write a program that prints the length of the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[]… Read More »

Given two arrays with size n, maximize the first array by using the elements from the second array such that the new array formed contains… Read More »

Given an array of length N that contains only integers, the task is to print the special numbers of array. A number in this array… Read More »

Given an array, count pairs in the array such that one element of pair divides other. Examples: Input : arr[] = {1, 2, 3} Output… Read More »

Given a graph with N nodes numbered from 1 to N and M edges and an array of numbers from 1 to N. Check if… Read More »

Direct Address Table is a data structure that has the capability of mapping records to their corresponding keys using arrays. In direct address tables, records… Read More »

Given an array of n integers, slope of a line i. e., m and the intercept of the line i.e c, Count the number of… Read More »

Given an array of N non-negative integers, task is to find the maximum size of a subarray such that the pairwise sum of the elements… Read More »

Given an array of n-integers. Array may contain repetitive elements but the highest frequency of any elements must not exceed two. You have to make… Read More »

Given a linked list. We need to find unique elements in the linked list i.e, those elements which are not repeated in the linked list… Read More »

Given N(very large), task if to print the largest palindromic number obtained by permuting the digits of N. If it is not possible to make… Read More »

Given a set S (all distinct elements) of integers, find the largest d such that a + b + c = d where a, b,… Read More »