## Find all N-digit numbers with given sum of digits

Find all N-digit numbers with equal sum. N varies from [1 to 9] and sum < = 81 (Maximum possible sum in a 9-digit number)

Read More Find all N-digit numbers with given sum of digitsCoding made easy

Find all N-digit numbers with equal sum. N varies from [1 to 9] and sum < = 81 (Maximum possible sum in a 9-digit number)

Read More Find all N-digit numbers with given sum of digitsConvert a given binary tree to BST (Binary Search Tree) by keeping original structure of the binary tree intact.

Read More Convert a Binary Tree to BST by maintaining its original structureGiven an array where all its elements are sorted except two elements which were swapped, sort the array in linear time. Assume there are no duplicates in the array.

Read More Sort an array using one swapImplement Quicksort algorithm using Hoare’s Partitioning scheme.

Read More Quick Sort using Hoare’s Partitioning schemeGiven a normal binary tree, convert it to Left-child right-sibling (LC-RS) binary tree.

Read More Convert normal binary tree to Left-child right-sibling binary treeGiven an unsorted array of integers, find a triplet with given sum in it.

Read More Find Triplet with given sum in an arrayImplement your own diff utility. i.e given two similar strings, efficiently list out all differences between them.

Read More Implement Diff UtilityGiven a number, check if it is power of four or not.

Read More Check if given number is power of 4 or notGiven M sorted lists of variable length, print them in sorted order efficiently.

Read More Merge M sorted lists of variable lengthGiven a string, calculate its rank among all its lexicographically sorted permutations. For example, consider below lexicographically sorted permutations

Read More Calculate rank of given string among all its lexicographically sorted permutationsGiven a linked list containing 0’s, 1’s and 2’s, sort linked list by doing single traversal of it.

Read More Sort linked list containing 0’s, 1’s and 2’sGiven two Boolean arrays X and Y, find the length of longest continuous sequence that starts and ends at same index in both arrays and have same sum. In other words, find max(j-i+1) for every j >= i where sum of sub-array X[i, j] is equal to sum of sub-array Y[i, j].

Read More Length of longest continuous sequence with same sum in given binary arraysImplement 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 AlgorithmIn this article, we will implement Ternary Search algorithm and compare its performance with Binary Search.

Read More Ternary Search vs Binary search