Dear All
Thank you for your attention.
I am writing a hiking guide system that helps user to find out if they go wrong path.
I would like to know the BEST PRACTICE and DATA TABLE STRUCTURE for storing the hiking rules which is just like a linked list and how to retrive back the data.
The hiking rules in my system
e.g.
Path | Check Point | Next Check Point |
1 | 1 | 2 |
1 | 2 | 3 |
1 | 22 | 23 |
1 | 23 | 27 |
1 | 27 | 28 |
Path | Check Point | Next Check Point |
1 | 1 | 2 |
1 | 2 | 3 |
2 | 22 | 23 |
2 | 23 | 24 |
2 | 24 | 25 |
When a user pass check point 23 and go to check point 29, the system WARN the user his next check point should be 24 or 27.
When the user pass check point 23 and then go to check point 24, the system INFORM the user next check point is 25.
A) I need to get back the whole list for each path
e.g. Path 1 -- 1 > 2 > 3 > 22 > 23 > 27 > 28
Path 2 -- 1 > 2 > 3 > 22 > 23 > 24 > 25
B) I need to get the previous and next checkpoint
e.g. At check point 23, get previous check point 22 and next possible check points 24 or 27
C) An interface for user to add/edit/delete and arrange the sortings of the rules
Anyone please let me know any ideas about the best tables and structures for linked list
Many Thanks
Best Regards
Ivan