## Find kth node from Middle towards Head of a Linked List

Given a Linked List and a number K. The task is to print the value of the K-th node from the middle towards the beginning… Read More »

Given a Linked List and a number K. The task is to print the value of the K-th node from the middle towards the beginning… Read More »

This is an extension of the median of two sorted arrays of equal size problem. Here we handle arrays of unequal size also. Examples: Input… Read More »

Given a binary tree containing n distinct numbers and a value x. The problem is to count pairs in the given binary tree whose sum… Read More »

Given a list of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in list. One of… Read More »

Given a sorted array and a target value, find the first element that is strictly smaller than given element. Examples: Input : arr[] = {1,… Read More »

Given a sorted array and a target value, find the first element that is strictly greater than given element. Examples: Input : arr[] = {1,… Read More »

Given an array, print the Next Smaller Element (NSE) for every element. The Smaller smaller Element for an element x is the first smaller element… Read More »

Given an array of n numbers where the difference between each number and the previous one doesn’t exceed one. Find the longest contiguous subarray such… Read More »

There are N Children are seated on N chairs arranged around a circle. The chairs are numbered from 1 to N. The game starts going… Read More »

Given an array A[] and size of array is N. The task is to delete element of array A[] are in given range L to… Read More »

Given an array arr[] and size of array is n and one another key x, and give you a segment size k. The task is… Read More »

Consider a problem where same elements are likely to be searched again and again. Implement search operation efficiently. Examples : Input : arr[] = {12… Read More »

Find an element in a given matrix such that each row and each column is sorted. Examples: Input : arr[] = { { 1, 2,… Read More »

Given array of sorted integer, search key and search preferences find array position. A search preferences can be: 1) EQUAL – search only for equal… Read More »

Given an array of N elements and an element K, find the index of an array element in Java. Examples: Input: a[] = { 5,… Read More »