Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Raul Acosta
Wrong output at n = 1

Raul Acosta

Jul 31, 2024

The solution returns true at n = 1, but there can be no self-edges. This should return false.

0

0

Comments
Comments
Shubham Vora
Shubham Voraa year ago

Problem constraints clearly states that inputs are generated in such a way so that start and destination nodes are not same.

On this page