## Find Triplet with given sum in an array

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

Read More Find Triplet with given sum in an arrayCoding made easy

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

Read More Find Triplet with given sum in an arrayImplement Quicksort efficiently for inputs containing many repeated elements. Quicksort exhibits poor performance for inputs that contain many repeated elements. The problem is clearly visible when all the input elements are equal. Then at each recursion, the left partition is empty (no input values are less than the pivot), and the right partition …

Read More Quicksort using Dutch National Flag AlgorithmGiven a mobile keypad having digits from [0-9] associated with each key, count total possible combinations of digits having length n. We can start with any digit and press only four adjacent keys of any digit. Keypad also contains * and # key which we are not allowed to press.

Read More Count total possible combinations of N-digit numbers in a mobile keypadThe longest common subsequence (LCS) problem is the problem of finding the longest subsequence that is present in given two sequences in the same order. i.e. find a longest sequence which can be obtained from the first original sequence by deleting some items, and from the second original sequence by deleting other items.

Read More Longest Common Subsequence of K-sequencesFind all N-digit strictly increasing numbers where N varies from [1 to 9]. If we process the number from left to right and for every pair of adjacent digits, if every digit is greater than the preceding digit, we can say that the digits are strictly increasing.

Read More Find all N-digit strictly increasing numbers (Bottom-Up and Top-Down Approach)Given a binary tree, write an efficient algorithm to check if tree is height balanced or not. In a height balanced tree, the absolute difference between height of left subtree and right subtree for every node is 0 or 1.

Read More Check if given binary tree is height balanced or notGiven a positive number N, find all combinations of 2*N elements such that every element from 1 to N appears exactly twice and distance between its two appearances is exactly equal to value of the element.

Read More All combinations of elements satisfying given constraintsGiven a string and a pattern containing wildcard characters i.e. ‘*’ and ‘?’, where ‘?’ can match to any single character in input string and ‘*’ can match to any number of characters including zero characters, design an efficient algorithm to find if the pattern matches with the complete input string or not.

Read More Wildcard Pattern MatchingGiven an array of integers, find the maximum sum of subsequence of given array where subsequence contains no adjacent elements.

Read More Find maximum sum of subsequence with no adjacent elementsGiven an array of integers, find all distinct combinations of given length where repetition of elements is allowed.

Read More Find all distinct combinations of given length with repetition allowedGiven an array of integers, find all distinct combinations of given length.

Read More Find all distinct combinations of given lengthGiven an array of integers, replace each element of the array with product of every other element in the array without using division operator.

Read More Replace each element of the array with product of every other element without using division operatorGiven a BST, find ceil and floor of a given key in it. If the given key lie in the BST, then both floor and ceil is equal to that key, else ceil is equal to next greater key (if any) in the BST and floor is equal to previous greater key (if any) in …

Read More Floor and Ceil in a Binary Search TreeGiven a Binary Search Tree and a positive number K, find K’th smallest and K’th largest element in BST.

Read More Find K’th smallest and K’th largest element in BST