Pergunta de entrevista da empresa Google

They asked me to solve a problem on detecting cycles in a directed graph and determine whether a valid course schedule was possible.

Resposta da entrevista

Sigiloso

17 de fev. de 2026

I explained the approach using Depth-First Search with a recursion stack to detect cycles. I first discussed the intuition, then wrote clean code while explaining time and space complexity. I also covered edge cases such as disconnected components.