Algorithm Details:
(1) Start by inserting all nodes that have no incoming edges onto a list
(2) Remove the first element from the list. Then we process it by removing its adjacent edges and update the destionation node's distance, backedge, and number of incoming edges. If the destination node ends up having 0 incoming edges, we append it to the list
(3) Repeat step (2) until the list is empty.