When searching for some value, the algorithm needs to know the associated key and explores the network in several steps. Each step will find nodes that are closer to the key until the contacted node returns the value or no more closer nodes are found. This is very efficient: Like many other DHTs, Kademlia contacts only {displaystyle O(log(n))} O(log(n)) nodes during the search out of a total of {displaystyle n} n nodes in the system.