# Two employees have shift schedules

Canonical URL: <https://datadriven.io/problems/two-employees-have-shift-schedules-use-isdisjoint-to-che-3bf9da2b>

Domain: Python · Difficulty: medium

## Problem

Two employees have shift schedules. Use .isdisjoint() to check if alice and bob have no overlap, then check alice and carol. Finally print the sorted common shifts between alice and carol using &.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/two-employees-have-shift-schedules-use-isdisjoint-to-che-3bf9da2b)
- [Python Interview Questions](https://datadriven.io/python-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.