Write a Java function, printTree(), which prints a given tree with hierarchy. The argument of printTree is a stream of pairs of string values. Each string found anywhere in the input represents a unique node.
Each item in the stream is a pair indicating a parent/child relationship in the tree. The first element in the pair is the parent, and the second element is the child. A parent can have many children. A generic class Pair<T, U> is required for implementation.
I never thought generics implementation would be asked, and I hadn't done that for a while. It took me about 10 minutes to complete the generics implementation.
The following metrics were computed from 3,728 interview experiences for the Google Software Engineer role in United States.
Google's interview process for their Software Engineer roles in the United States is extremely selective, failing the vast majority of engineers.
Candidates reported having very good feelings for Google's Software Engineer interview process in United States.