## Find Triplet with given Sum in an Array

Given an unsorted array of integers, find a triplet with given sum in it.

## Find the surpasser count for each element of an array

Given an array of integers having distinct elements, find the surpasser count for each element in it. In other words, for each element of the array, find the number of elements to its right which are greater than it.

## Efficiently Sort an Array with many Duplicated Values

Given an array with many duplicated elements, write an algorithm to efficiently sort it in linear time where the order of equal elements doesn’t matter.

## Construct a Binary Tree from Ancestor Matrix

Given an ancestor matrix, whose cell (i, j) has value true if i is ancestor of j in a binary tree, construct a binary tree from it where binary tree nodes are labelled from 0 to n-1 where n is the size of the ancestor matrix.

## Count the distinct absolute values in the sorted array

Given an array of sorted integers which may have several duplicates elements, count the number of distinct absolute values in the array.

## Determine if a pattern matches with a string or not

Given a string and a pattern, determine if the pattern matches with the string or not. The solution should not use any regex.

## Check if subarray with 0 sum is exists or not

Given an array of integers, check if array contains a sub-array having 0 sum.

## Implement Trie Data Structure in Java

Trie is a tree-based data structure used for efficient retrieval of a key in a huge set of strings. In this post, we will implement Trie data structure in Java.

## Find two duplicate elements in an limited range array (using XOR)

Given an array of integers with all its elements between 1 to n with the exception of two elements which occur twice. Find two duplicate elements without using any extra memory.

## Find subarray having given sum in given array of integers

Given an array of integers, find a subarray having given sum in it.

## Find largest sub-array formed by consecutive integers

Given an array of integers, find largest sub-array formed by consecutive integers. The sub-array should contain all distinct values.

## Find a duplicate element in a limited range array

Given a limited range array of size n where array contains elements between 1 to n-1 with one element repeating, find the duplicate number in it.