-1

I have a data structude ST that contains an array of entities of ST.

struct ST {
    ST[];
}

I need to sort it by deep-value.

For example i have an array of ST: [A { B, C, D }, B { C, D }, C, D { E }, E, F]

And i want to get result like this: [E, D, C, B, E, F, A]

Can somebody help me?

user2890234
  • 332
  • 1
  • 2
  • 10

1 Answers1

0

The solution depends on what language you are using however the basic idea remains the same. The idea is that each struct can have a value assigned which can then be used for sorting.

A similar question was asked here: Sort ArrayList of custom Objects by property

I hope this helps, but generally you should try asking questions in greater detail

Community
  • 1
  • 1
bnm
  • 108
  • 6