Coincidentally I just did an asymptotic complexity analysis yesterday (something I rarely do). It seemed right since it's by the book but I wasn't sure. After running the extensive benchmarks on the algorithm, I was so happy to find the results matched the asymptotic prediction. The lesson is verify, verify, and always verify.
[1] Algorithm, https://github.com/williamw520/toposort/blob/master/Algorith...
[2] Benchmarks, https://github.com/williamw520/toposort/blob/master/README.m...