Arranging related nodes in doubly linked list
I've used the PrevNext module to accomplish a similar requirement. 

Out-of-the-box functionality of this module would normally cover basic requirements in choosing the Previous and Next nodes such as:


Selection based on node created or changed date.
Selection based on node's nid field and title.
Additionally one has the ability to limit the previous and next to nodes of the same content type.


The nice part is that for any given node the previous and next nodes will be determined earlier and saved in the module's table by its own cron task (hook_cron implementation). Hence instead of determining the previous and next nodes (which could be costly in terms of time and space) while viewing a node and adding those to the page load a simple select query gets the predefined value.

Making call to prev_next_nid with your node id and operation as 'prev' or 'next' would provide one with the previous and next nodes' values which can themed to be displayed.

Additionally a hook hook_prev_next_nid is provided for developers to customize the function.

The caveats are that 


if your logic for prev/next are not covered within the default functionality you might have to consider alternate means as there's not much option to cover such features as stated in the module's home page and 
that the module showing up as dev version if you feel insecure by that status. However  it seemed to work pretty well for me and appeared to be stable.


Note that the prev/next index will be cleared and rebuilt from scratch when user changes settings per a node type in the admin interface.