In k-partition problem, we need to partition an array of positive integers into k disjoint subsets that all have equal sum and they completely covers the set.
3-partition problem: Given a set S of positive integers, determine if it can be partitioned into three disjoint subsets that all have same sum and they cover S.
Given an array A which represents a binary tree such that the parent-child relationship is defined by (A[i], i) for every index i in the array A, build binary tree out of it.
Given an array of integers, find a subset in it that has maximum product of its elements.
Given an unsorted array of integers, print all pairs with given difference k in it without using any extra space.
Given an unsorted array of integers, print all pairs with given difference k in it.
Quickselect is a selection algorithm to find the kth smallest element in an unordered list. It is closely related to the quicksort sorting algorithm.
Given an unsorted array of integers, check if it contains four elements tuple (Quadruplets) having given sum.
Given a linked list, write a function which deletes any duplicate nodes from the list by traversing the list only once.
Given an unsorted array of integers, find a triplet with given sum in it.
Given M sorted lists of variable length, print them in sorted order efficiently.
Given a string, calculate its rank among all its lexicographically sorted permutations. For example, consider below lexicographically sorted permutations