โ† PayPal questions

Detect a cycle in a directed cyclic graph

Filed under PayPal

Given a directed graph represented as an adjacency list, write a function to detect if the graph contains any cycles.

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 PayPal questions

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