Company: TI
Difficulty: easy
In-Degree Report You are given a directed graph whose vertices are named with uppercase English letters, A through Z . The in-degree of a vertex is the number of edges that point at it. A vertex is present in the graph if it is the source or the destination of at least one edge. Vertices that no edge touches are not part of the graph and must not be reported. Report every present vertex together with its in-degree, in ascending alphabetical order. Function Description Complete the function computeInDegrees with the following parameters: string u[e] : the source endpoint of each edge string v[e] : the destination endpoint of each edge Edge i runs from u[i] to v[i] . ### Returns string[] : one entry per present vertex, in ascending alphabetical order, each entry being the vertex letter, a single space, and its in-degree Constraints 1 <= e <= 650 Every u[i] and every v[i] is a single uppercase English letter ( A to Z ) u[i] != v[i] : there are no self-loops No ordered pair appears t