CSES Solutions - Fixed-Length Paths I
Given a tree of n nodes, your task is to count the number of distinct paths that consist of exactly k edges. Example: Input: n = 5 , k = 2, edges = {{1, 2}, {2, 3}, {3, 4}, {3, 5}Output: 4 Input: n = 5 , k = 3, edges = {{1, 2}, {2, 3}, {3, 4}, {3, 5}Output: 2 Approach: The main idea is that we can u