|
Hi, I want to sort a matrix in a tree, where 1. the first element represent the parent and all the rest are inside it 2. except the first one, the rest may not follow any order of inclusion relationship here is the matrix, 1, 2, 3, 4, 5, 6, 7, 8 2, 3, 4, 5 4, 3, 5 3, 5 5 6, 7 7 8 9, 10 10 The problems are 1. is how would I know which one is the imedaite parent of i.e 3 or 7 or 8 2. 9 is another root node (which do not have any parent like 1)
(comments are locked)
|
