http://www.fullstackprep.dev/Articles/dsa/datastructure/directed-acyclic-graph