No. of subtrees of a tree with atmost k egdes.

There is a tree with n vertices and n-1 edges.The problem is to find the number of subtrees of that tree that have at most k edges(k < n).Is there a DP solution also ???

1 Like

This Question was already asked :slight_smile:
Duplicate of the Question

2 Likes

@everyone : Why are you people discussing live contest questions . This is unfair and unethical .
@admin : Please remove the related threads.

Trying to solve the CNTTREE on spoj

@vineetpaliwal I’m participating in the contest and Actually the problem is the question they asked in the contest was a duplicate of other one which is present in many other instances like

  1. SPOJ

2.CODECHEF

So When the Users ask these questions we can’t really differentiate between ongoing contests problems and practice problems

2 Likes

@rakeshbubli143…pls try and update the same ans…don’t keep on adding new answers…:slight_smile:

My Intention is to give reply to @vineetpaliwal sir :slight_smile: Thanx for suggesting :slight_smile:

1 Like