# From the start node, find the node responsible # for the target key def findNode(start, key): current=start while distance(current.id, key) > \ distance(current.next.id, key): current=current.next return current # Find the responsible node and get the value for # the key def lookup(start, key): node=findNode(start, key) return node.data[key] # Find the responsible node and store the value # with the key def store(start, key, value): node=findNode(start, key) node.data[key]=value