Check if adding edge creates cycle in digraph | Amazon Interview Question