Add tsort

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
Merge pull request #361 from akiradeveloper/feature/add-tsort-v2

Add tsort