Google | Phone Interview | Build Special Binary Tree
Anonymous User
1843
Apr 13, 2022
Apr 14, 2022
I had a technical phone screen with Google today for an L4 position. The question was something like this:
Given a map of values where the key represents a letter & the value represents the depth build a tree where:
- The depth on the left side of the tree is lower than the right side.
- Only the leaves have values. All other nodes have * as a value.
- Leaves on the same level are ordered by their alphabetic key value.
Example:
Input : {"a": 2, "b": 1, "e": 2 }
Output:
*
/ \
b *
/ \
a eUnfortunately, I could not get this one.
Comments (17)


