Skip to content

Practice Actors and Directors Who Cooperated At Least Three Times

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#1050
LeetCode Problem

Actors and Directors Who Cooperated At Least Three Times

Problem Statement

Tables: ActorDirector(actor_id INT, director_id INT, timestamp INT). ActorDirector.timestamp is unique. Each row records one cooperation. Return actor_id and director_id pairs having at least three cooperation rows, in any order.

Source: Actors and Directors Who Cooperated At Least Three Times on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
ActorDirector table: +-------------+-------------+-------------+ | actor_id    | director_id | timestamp   | +-------------+-------------+-------------+ | 1           | 1           | 0           | | 1           | 1           | 1           | | 1           | 1           | 2           | | 1           | 2           | 3           | | 1           | 2           | 4           | | 2           | 1           | 5           | | 2           | 1           | 6           | +-------------+-------------+-------------+
Output
+-------------+-------------+ | actor_id    | director_id | +-------------+-------------+ | 1           | 1           | +-------------+-------------+

Related LeetCode Problems

Practice more problems similar to Actors and Directors Who Cooperated At Least Three Times.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.