Varun12's blog

By Varun12, history, 19 months ago, In English

Given a tree with tree nodes vertices where each vertex denotes a place in a land, find the number of ways such that exactly k vertices have an active connection. A vertex has an active connection when there is a tower in that vertex, or there is a tower in any other vertex directly connected to that vertex. Determine the total number of ways such that exactly k places have an active connection in HackerLand for each k=0,1,2,.,tree nodes. Since the answer can be large, return it modulo (10^9+7).

  • Vote: I like it
  • -1
  • Vote: I do not like it

| Write comment?
»
6 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

If anyone has solution for this ques ,then please consider sharing it with all of us :)