DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Tallest Stacks

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

Domain
Python
Difficulty
medium
Seniority
mid

Problem

A terminal operations export logs one row per vessel call, each row naming the `terminal` that handled the call and the `teu` (container volume) it moved. For each terminal, report its two highest unique `teu` values, largest first, so a volume hit on several calls still counts only once. A terminal with only a single volume reports just that value, and an empty export reports nothing.

Summary

Every terminal has its records. Find the two that stand tallest.

Practice This Problem

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

Related

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