Company: sprinklr_21july
Difficulty: medium
Cube-Labeled Tree Problem Description You are given a perfectly balanced n-ary tree with k levels. Every node of this tree must be labeled with one of the numbers found on the faces of a standard six-sided die, in such a way that the whole labeling is Cube-Valid. A labeling is Cube-Valid if the following holds: For every node labeled with a value p (1 Note: a face is never treated as adjacent to itself. Work out how many distinct labelings of the tree are Cube-Valid. Because this count can be enormous, report it modulo 10^9 + 7. Note for reference: Following is a perfect binary tree with 4 levels (image not included in HTML output). Input Format: 2 space separated integers, n and k Examples Example 1: Input: 3 3 Output: 100663296 Constraints 2 1 Note Your submission needs to reproduce the sample output above for the given sample input, and it will also be run against a separate batch of hidden test cases, so make sure your solution holds up beyond just this example. Limits Time Limit: