摘要: Given a hash table of size N, we can define a hash function H(x)=x%N. Suppose that the linear probing is used to solve collisions, we can easily obtai 阅读全文
posted @ 2019-11-30 22:46 王清河 阅读(272) 评论(1) 推荐(0) 编辑
摘要: 实现QQ新帐户申请和老帐户登陆的简化版功能。最大挑战是:据说现在的QQ号码已经有10位数了。 输入格式: 输入首先给出一个正整数N(≤10^​5​​),随后给出N行指令。每行指令的格式为:“命令符(空格)QQ号码(空格)密码”。其中命令符为“N”(代表New)时表示要新申请一个QQ号,后面是新帐户的 阅读全文
posted @ 2019-11-30 18:54 王清河 阅读(194) 评论(0) 推荐(0) 编辑
摘要: The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. 阅读全文
posted @ 2019-11-30 16:10 王清河 阅读(239) 评论(0) 推荐(0) 编辑