I need some help with a project that I'm working on.

I have to make a program which can store hierarchical data to represent an employee referral system (and who has referred who/who was referred by whom). This needs to be able to traverse both ways, I.E.

Bill has referred John, John has referred Tom and Tim, Tom referred X,Y,Z and Tim reffered A,B,C and so on...

But also go back up I.E Tom was referred by John, and John was referred by Bill.

What would be the best way of doing this in terms of the class used to store and access this data? I recognize that this can be done with a lot of java libraries including most list types but what would be the best, can you also give a reason as to why it would be good to help me better decide? Reasons might include stuff like less computation time, cleaner code, and so on

Edited by asif49: n/a

6 Years
Discussion Span
Last Post by asif49

I have read about them, but I'm having trouble understanding what makes them so special. Each node points to the next node (but that's the case with all array based structures) and it doesn't actually make much of a difference since the whole list needs to be traversed by index value anyway.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.