|
|
back to boardShow all messages Hide all messagesTell me please... dobrie lyudi:) what kind of algorithm may we use in this problem. ? disjiont set can solve this problem well! try it and good luck! How it can be solved with disjoint sets? Do you mean Find-Union??? what to do with it? Edited by author 24.10.2008 15:40 A heuristic approach can further optimize the disjoint set by using an array to determine the depth of each tree in the forest. the less deep tree should join the deeper tree, so that the trees are normally balanced. |
|
|