On Jul 4, 2:16 pm, jalaj jaiswal <[email protected]> wrote: > find the subsequence in an array which sum to k
This equivalent to the subset sum problem, which is weakly NP-hard. See http://en.wikipedia.org/wiki/Subset_sum_problem for a pseudo-poly time DP algorithm. A related, interesting problem is to find a sub_range_ of an array that sums to k. This can be solved in linear time in the array size. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
