Skip to content

Tag Archives: meet-in-the-middle

Given a permutation P = p1, p2, …., pn of first n natural numbers (1 ≤ n ≤ 10). One can swap any two consecutive… Read More
Given a set of N integers. Find how many subsets of given array have sum between A and B(inclusive).   Constraints: 1 ≤ N ≤ 34, -2 *… Read More
Given a set of n integers where n <= 40. Each of them is at most 1012, determine the maximum sum subset having sum less… Read More