From the little I understand, one way of doing topological sorting if you have a readymade efficient black-box method for strongly connected components would be:
(assumption - no self loops)
Regardless of efficiency, is the above a "technically correct" way to do topological sorting?
I just want to make sure I understand things correctly.
Yes, it's technically correct, because a digraph without self-loops is acyclic (i.e., topologically sortable) iff all strong components have size 1. The most common topological sorts do cycle detection as an easy byproduct, though.