01 2017 档案
摘要:Description 使用线性探测法(Linear Probing)可以解决哈希中的冲突问题,其基本思想是:设哈希函数为h(key) = d, 并且假定哈希的存储结构是循环数组, 则当冲突发生时, 继续探测d+1, d+2…, 直到冲突得到解决. 例如, 现有关键码集为 {47,7,29,11,1
阅读全文
摘要:Description 请用HASH链式法来解决冲突,且规定链表在链表头插入新元素。 规定HASH函数为:h(x) = x % 11,即哈希数组下标为0~10. 给定两种操作: I 操作,插入一个新的正整数K到哈希表中 F 操作,查询整数K是否在哈希表中,若不在,输出-1;若存在,输出目前K在所在链
阅读全文
摘要:Description template <typename E> class LinkedList { private: // inner class: linked-list node class Node { public: E data; Node * next; }; Node * fir
阅读全文
摘要:Description At present, Zhongshan University has 4 campuses with a total area of 6.17 square kilometers sitting respectively on both sides of the Pear
阅读全文
摘要:Description There are N cities and N-1 roads in Magic-Island. You can go from one city to any other. One road only connects two cities. One day, The k
阅读全文