I have
class cluster{
string name;
string id;
list<Feature> flist;
}
class Feature{
string name;
string id;
}
cluster can have multiple lists of Feature
Now I have list of Feature say list<Feature> list={f1,f2,f3,f4} , thease Feature objects can be spread across different cluster objects and some might be not part of any cluster.
I have list of cluster and I have to sort based on the list of Feature I have.
input:
cluster1-f2,f6,f7
cluster2-f3,f4,f5
cluster3-f9,f8
cluster4-f1,f10
cluster5-f11,f12
output:
cluster4-f1,f10
cluster1-f2,f6,f7
cluster2-f3,f4,f5
cluster3-f9,f8
cluster5-f11,f12
Please help me to sort cluster objects based on the given Feature list.