in reply to sort and hash
Maybe 'I want to use a hash' is not a good approach here. It seems you'd be better off using a sorted array for your nodes and use binary search to insert new items.