20162314 《Program Design & Data Structures》Learning Summary Of The Eleventh Week
20162314 2017-2018-1 《Program Design & Data Structures》Learning Summary Of The Eleventh Week
Summary of Key Concepts
In hashing, elements are stored in a hash table, with their location in thetable determined by a hashing function.
The situation where two elements or keys map to the same location in the table is called a collision.
A hashing function that maps each element to a unique position in the table is said to be a perfect hashing function.
Extraction involves using only a part of the element’s value or key to compute the location at which to store the element.
The division method is very effective when dealing with an unknown set of key values.
In the shift folding method, the parts of the key are added together to create the index.
The length-dependent method and the mid-square method may also be effectively used with strings by manipulating the binary representations of the characters in the string.
Although Java provides a hashcode method for all objects, it is often preferable to define a specific hashing function for any particular class.
The chaining method for handling collisions simply treats the hash table conceptually as a table of collections rather than as a table of individual cells.
The open addressing method for handling collisions looks for another open position in the table other than the one to which the element is originally hashed.
The load factor is the maximum percentage occupancy allowed in the hash table before it is resized.
Problem and solution in teaching materials.
What is the difference between a hash table and the other collections we have discussed?
- Elements are placed into a hash table at an index produced by a function of the value of the element or a key of the element.
- This is unique from other collections where the position/locationof an element in the collection is determined either by comparison
- with the other values in the collection or by the order in which the elements were added or removed from the collection.
What is our goal for a hashing function?
- We need a hashing function that will do a good job of distributing elements into positions in the table.
What is the consequence of not having a good hashing function?
- If we do not have a good hashing function, the result will be too many elements mapped to the same location in the table. This will result in poor performance.
Why is deletion from an open addressing implementation a problem?
- Because of the way that a path is formed in open addressing,deleting an element from the middle of that path can cause elements beyond that on the path to be unreachable.
What is the load factor and how does it affect table size?
- The load factor is the maximum percentage occupancy allowed in the hash table before it is resized. Once the load factor has
- been reached, a new table is created that is twice the size of the current table, and then all of the elements in the current table
- are inserted into the new table.
Code hosting
What is the maximum number of edges for an undirected graph? A directed graph?
- The maximum element is removed from a heap (maxheap) by replacing the root with the last leaf of the tree, then moving that
- element down the tree as appropriate to reassert the proper relationships among the elements.
Summary of error for last week.
Linear search is always more effective than binary search.The answer should be false, for the situation of "n = 2".
Evaluate for my partner
- Advantage and problem in the blog:
- Concise and comprehensie
- Uncleary to the content
- Mould is amazing
- Advantage and problem in the code:
- Serious writing.
- Wonderful idea
- Too less
Learning situation of partner
- Learning content of partner:
- Algorithm
- Recursion
- HanoiTowers and maze
Anything else that want to say
- It's not easy to persere on utizing English to write a blog.But I'm getting used to doing this because of the benefit.
Academic progress check
Code line number(increasing/accumulative) | Blog number(inc/acc) | studying time(inc/acc) | progress | |
---|---|---|---|---|
target | 5000lines | 30articles | 400hours | |
First week | 180/180 | 1/1 | 20/20 | |
Second week | 1049/1229 | 1/2 | 18/38 | |
Third week | 1037/2266 | 3/7 | 22/60 | |
Fourth week | 1120/3386 | 2/9 | 30/90 |
20162314 《Program Design & Data Structures》Learning Summary Of The Eleventh Week的更多相关文章
- 20162314 《Program Design & Data Structures》Learning Summary Of The Ninth Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Ninth Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Seventh Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Seventh Wee ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Fifth Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Fifth Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Second Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Second Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The First Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The First Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Tenth Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Tenth Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Eighth Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Eighth Week ...
- 20182320《Program Design and Data Structures》Learning Summary Week9
20182320<Program Design and Data Structures>Learning Summary Week9 1.Summary of Textbook's Con ...
- 【Python学习笔记】Coursera课程《Python Data Structures》 密歇根大学 Charles Severance——Week6 Tuple课堂笔记
Coursera课程<Python Data Structures> 密歇根大学 Charles Severance Week6 Tuple 10 Tuples 10.1 Tuples A ...
随机推荐
- MUI 页面跳转(传值+接收)
官方:做web app,一个无法避开的问题就是转场动画:web是基于链接构建的,从一个页面点击链接跳转到另一个页面, 如果通过有刷新的打开方式,用户要面对一个空白的页面等待: 如果通过无刷新的方式,用 ...
- LeetCode——House Robber
Description: You are a professional robber planning to rob houses along a street. Each house has a c ...
- sencha touch 入门系列 (一)sencha touch 简介
参考链接:http://mobile.51cto.com/others-278381.htm Sencha touch 是基于JavaScript编写的Ajax框架ExtJS,将现有的ExtJS整合J ...
- 批量远程执行linux服务器程序--基于pxpect(多进程、记日志版)
#!/usr/bin/python '''Created on 2015-06-09@author: Administrator''' import pexpect import os,sys fro ...
- maven学习(二)(转)
一.maven父工程与子模块的拆分与聚合原理 问题描述:将ssh工程拆分为多个模块开发 1.1.拆分原理 创建一个maven project(pom),然后在创建三个子模块(maven moudule ...
- Xshell配置ssh免密码登录-密钥公钥(Public key)
1 简介 ssh登录提供两种认证方式:口令(密码)认证方式和密钥认证方式.其中口令(密码)认证方式是我们最常用的一种,这里介绍密钥认证方式登录到linux/unix的方法. 使用密钥登录分为3步: 1 ...
- centos6.8 环境一键安装包 nginx配置thinkphp5
---恢复内容开始--- lnmp1.4 一键安装包 nginx配置thinkphp5 环境:Nginx1.12.1 PHP5.6 Coentos6.8 修改网站配置文件 ser ...
- UESTC 485 Game(康托展开,bfs打表)
Game Time Limit: 4000/2000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit Status t ...
- could not execute menu item系统找不到指定的文件
Wamp3.0.6 64bit,系统任务栏图标,左键,Apache菜单,httpd.conf,报错“could not execute menu item.....系统找不到指定的文件” 根据网上的搜 ...
- 关于Python装饰器内层函数为什么要return目标函数的一些个人见解
https://blog.csdn.net/try_test_python/article/details/80802199 前几天在学装饰器的时候,关于装饰器内层函数调用目标函数时是否return目 ...