You will need two data structures that somehow keep ``links'' between each other.