DataDrivenDataDriven
LearnPracticeInterviewDiscussDailyJobs

Where the Buck Stops

A hard Python interview practice problem on DataDriven. Write and execute real python code with instant feedback.

Domain
Python
Difficulty
hard
Seniority
L5

Problem

A directory export gives you reporting lines as (`manager`, `report`) pairs in no particular order, and you need the org chart back. Return the reporting hierarchy as nested dictionaries, with the one person nobody reports to at the top.

Summary

A pile of reporting lines, no order to them. Somewhere in the bag sits the one with no boss.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and checks it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons