算法lintcode
baidu_36094751
这个作者很懒,什么都没留下…
展开
-
重哈希rehashing
题目:哈希表容量的大小在一开始是不确定的。如果哈希表存储的元素太多(如超过容量的十分之一),我们应该将哈希表容量扩大一倍,并将所有的哈希值重新安排。假设你有如下一哈希表:size=3, capacity=4[null, 21, 14, null] ↓ ↓ 9 null ↓ null哈希函数为:int hash...原创 2018-07-17 09:49:39 · 4303 阅读 · 1 评论 -
424. Longest Repeating Character Replacement学习笔记
Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the length of a longest substring containing all repe...原创 2018-07-17 14:29:26 · 187 阅读 · 0 评论