哈希
明明77
这个作者很懒,什么都没留下…
展开
-
Hash算法原理
散列表,它是基于高速存取的角度设计的,也是一种典型的“空间换时间”的做法。顾名思义,该数据结构能够理解为一个线性表,可是当中的元素不是紧密排列的,而是可能存在空隙。 散列表(Hash table,也叫哈希表),是依据关键码值(Key value)而直接进行訪问的数据结构。也就是说,它通过把关键码值映射到表中一个位置来訪问记录,以加快查找的速度。这个映射函数叫做散列函数,存放记录的数组叫做散列表。转载 2017-12-13 19:07:31 · 155 阅读 · 0 评论 -
[leetcode]1.Two Sum
题目链接:https://leetcode.com/problems/two-sum/Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers su转载 2017-12-13 18:57:42 · 136 阅读 · 0 评论 -
[leetcode] 3. Longest Substring Without Repeating Characters
题目链接:https://leetcode.com/problems/longest-substring-without-repeating-characters/Given a string, find the length of the longest substring without repeating characters. For example, the longest substri转载 2017-12-15 08:36:19 · 125 阅读 · 0 评论 -
[Leetcode]70.Climbing Stairs
[leetcode] 70. Climbing Stairs题目链接:https://leetcode.com/problems/climbing-stairs/You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how转载 2017-12-25 18:46:11 · 188 阅读 · 0 评论