20 votes 20 votes Find the number of Topological order(sort) in the given graph? $(1)$ $(2)$ DS data-structures no-of-topological-ordering + – Lakshman Bhaiya asked Oct 16, 2018 • edited Oct 16, 2018 by Lakshman Bhaiya Lakshman Bhaiya 5.1k views answer comment Share Follow See all 12 Comments See all 12 12 Comments reply Show 9 previous comments Magma commented Dec 28, 2018 reply Follow Share @Shaik Masthan.i check your solution but can you tell me what are the conditions that I didn't consider in my answer ..which is given above ?? where it's goes wrong ? As if I fixed the " 0" it count all the possible arrangements nah ?? 0 votes 0 votes Shaik Masthan commented Dec 28, 2018 reply Follow Share _ _ _ O _ _ again 2 ways before 0, there should be 5,4,2 those are arranged in 3 ways but not 2 ways, i) 4,5,2 ii) 5,4,2 iii) 5,2,4 you missed these type of possibility in every case, now recheck it ! 1 votes 1 votes Magma commented Dec 28, 2018 reply Follow Share Ouuh Thanks brother :) 0 votes 0 votes Please log in or register to add a comment.
Best answer 32 votes 32 votes Free Bird Means you are allowed to place that element anywhere for clarity images https://drive.google.com/open?id=16HI6ZnbX82FRQslO2v1515l1EsdjRirj Shaik Masthan answered Dec 28, 2018 • selected Dec 28, 2018 by Lakshman Bhaiya Shaik Masthan comment Share Follow See all 9 Comments See all 9 9 Comments reply Show 6 previous comments Shaik Masthan commented Oct 23, 2019 reply Follow Share It showing, After choosing 1 at end, then how we went further. Further there are two choices, either 3 or 0 will be infront of 1. For better understanding draw each step on paper, then you can understand ! 0 votes 0 votes abhiarns commented Mar 4, 2020 i edited by Shaik Masthan Mar 4, 2020 reply Follow Share @manisha11, Shaik Masthan Sir has written 5 at the end (first part of question, case 2) for these cases: 4->5->1->0 4->5->0->1 5->1->4->0 5->4->1->0 5->4->0->1 0 votes 0 votes Kiyoshi commented Jun 3, 2021 reply Follow Share @abhiarns in the order it’s not 1 it must be 2 see the orderings… 5 2 4 0 5 4 2 0 5 4 0 2 4 5 0 2 4 5 2 0 0 votes 0 votes Please log in or register to add a comment.