โ† Bloomberg questions
CodingReported in a candidate post, Jun 2020

Fill each node's friends as itself and same-level nodes

Filed under Bloomberg

Given a tree, populate a friends list on every node, where a node's friends are itself and all other nodes on the same level (depth) of the tree. Return the tree with friends filled in.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Bloomberg questions

Collected from public candidate posts and coding forums. Updated Nov 2026.