Tuesday 21 February 2017

Maximum Coin Sum Set Of Non Adjacent Vertices In Tree


DYNAMIC PROGRAMMING

Given a tree T of N nodes, where each node i has Ci coins attached with it. You have to choose a subset of nodes such that no two adjacent nodes(i.e. nodes connected directly by an edge) are chosen and sum of coins attached with nodes in chosen subset is maximum.



View Ramesh Chandra's profile on LinkedIn

Ramesh Chandra

No comments:

Post a Comment