Hi! I have the following data:
Code:
one 1 0
two 2 0
three 3 1
four 4 1
five 5 1
six 6 4
seven 7 1
eight 8 4
nine 9 1
ten 10 8
and I need to print these values out like:
Code:
one
- three
- four
- six
- eight
- ten
- five
- seven
- nine
two
The names are ordered by their second integer based on the value of the first. Names with a 1 as the second integer will go under the name with 1 as its first integer, and so on.
What is the best way of doing this in C? I was thinking a hash, but I don't know if it's possible to create a hash in C (I'm used to Python where hashes are very easy to use).
Any help would be appreciated.