-
Re: Sorting Algorithms
I have to sort a list on Parent Child relation
say
I have a following list
Object(Id,ParentId,.........)
obj1(1,1,........);
obj2(2,1,........);
obj3(3,3,........);
obj4(4,1,........);
obj5(5,3,........);
obj6(6,1,........);
obj7(7,3,........);
obj8(8,4,........);
Logic is such that
If Id and Parent Id is same then It is Parent Record
I want the Result like
obj1(1,1,........);
obj2(2,1,........);
obj4(4,1,........);
obj6(6,1,........);
obj3(3,3,........);
obj5(5,3,........);
obj7(7,3,........);
obj8(8,4,........);
Suggect Some Logic...............
Thanks in advance.............
-
Re: Sorting Algorithms