标签:
直接寻址方式:
class HashTable: def __init__(self, length): self.T = [None for i in range(length)] class Data: def __init__(self, key, satelite_data): self.key = key self.satelite_data = satelite_data class Solution: def DIRECT_ADDRESS_SEARCH(self, T, k): return T[k] def DIRECT_ADDRESS_INSERT(self, T, x): T[x.key] = x def DIRECT_ADDRESS_DELETE(self, T, x): T[x.key] = None
标签:
原文地址:http://www.cnblogs.com/zuoyuan/p/4341466.html