Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
正在生成预览...
Tài liệu thảo luận số 14, bao gồm thông báo, bài tập về Weighted Quick Union và HashMaps, cùng tổng quan các khóa học CS tại UC Berkeley.
描述
Discussion 14: Misc.onclusion Christine Zhou Agenda Announcements Worksheet CS Courses Overview Optional: Interview Question Tips Announcements Cookies!! HW8 due Friday 12/1 Proj3 due Wednesday 12/6 Tentative plan for dead week: No discussion OH as normal Lab will be converted to topic based review Design! Weighted Quick Union with Path Compression Used to represent connectivity between items Each item belongs to its own set, “union” the items together by connecting the sets together Sets will have a tree like structure Optimizations: Union by weight: connect the root of the “lighter” set to the root of the “heavier” set (determined by number of nodes in the set) Path compression: when you “find” a node, compress the node and the path to the node by connecting it to the root of the set 61BL Lab about Disjoint Sets HashMaps Use an array to represent your data For each key-value pair, assign each key a “hash code” mod (%) the hash code by the length of the array (this gives you a number between 0 and array.length - 1), use this as the index! N = num elements, M = num buckets, C = some constant If N/M > C, then increase M! N/M is called the load factor If we have multiple elements that go to same place in the array, usually we will keep track of a list Be careful about negative numbers when modding! This is called external chaining What is the runtime of .contains and .insert? Course Overview (Personal experiences) CS61C: Machine Structures C, assembly language Learn about how computers work! Caching, MapReduce, parallelism CS170: Algorithms CS70: Discrete Math/Probability Proofs for things we’ve seen so far Problem set every week Stable marriage, modular arithmetic, graph theory, etc. CS186: Databases Learn SQL and how databases keep track of all your data, Java “Chill”, though exam was tough this time around…, some projects Guest speakers from the industry Learn to analyze runtimes,
AI 摘要
- 文档名称
- Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
- 学校 / 课程
- University of California, Berkeley · Lập trình Java
- 内容
- Buổi thảo luận cuối cùng này cung cấp thông báo về bài tập, dự án và kế hoạch tuần cuối. Tài liệu cũng giới thiệu chi tiết về các khóa học Khoa học Máy tính khác nhau và các khái niệm kỹ thuật như Weighted Quick Union và HashMaps.
- 目录
- Agenda
- Announcements
- Design!
- Weighted Quick Union with Path Compression
- HashMaps
- Course Overview (Personal experiences)
- Course Overviews (16x)
- Course Overviews (16x) cont.
- Course Overview (17x)
- Course Overview (18x)
- Course Overview (other)
- 页数
- 18 页
- 上传者
- Uni24h
常见问题
此文档免费吗?
是的。“Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou”是免费的 — 只需登录并点击“下载”即可获取原始文件。
这份文档有多少页?
该文档共有 18 页,适用于课程 Lập trình Java。您可以在下载前进行在线预览。
我可以在下载前预览吗?
是的。您可以通过在线阅读器直接在本页面预览此文档,然后再决定是否下载。
Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
正在生成预览...
Discussion 14: Misc.onclusion Christine Zhou Agenda Announcements Worksheet CS Courses Overview Optional: Interview Question Tips Announcements Cookies!! HW8 due Friday 12/1 Proj3 due Wednesday 12/6 Tentative plan for dead week: No discussion OH as normal Lab will be converted to topic based review Design! Weighted Quick Union with Path Compression Used to represent connectivity between items Each item belongs to its own set, “union” the items together by connecting the sets together Sets will have a tree like structure Optimizations: Union by weight: connect the root of the “lighter” set to the root of the “heavier” set (determined by number of nodes in the set) Path compression: when you “find” a node, compress the node and the path to the node by connecting it to the root of the set 61BL Lab about Disjoint Sets HashMaps Use an array to represent your data For each key-value pair, assign each key a “hash code” mod (%) the hash code by the length of the array (this gives you a number between 0 and array.length - 1), use this as the index! N = num elements, M = num buckets, C = some constant If N/M > C, then increase M! N/M is called the load factor If we have multiple elements that go to same place in the array, usually we will keep track of a list Be careful about negative numbers when modding! This is called external chaining What is the runtime of .contains and .insert? Course Overview (Personal experiences) CS61C: Machine Structures C, assembly language Learn about how computers work! Caching, MapReduce, parallelism CS170: Algorithms CS70: Discrete Math/Probability Proofs for things we’ve seen so far Problem set every week Stable marriage, modular arithmetic, graph theory, etc. CS186: Databases Learn SQL and how databases keep track of all your data, Java “Chill”, though exam was tough this time around…, some projects Guest speakers from the industry Learn to analyze runtimes,
阅读全文
- 文档名称
- Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
- 学校 / 课程
- University of California, Berkeley · Lập trình Java
- 内容
- Buổi thảo luận cuối cùng này cung cấp thông báo về bài tập, dự án và kế hoạch tuần cuối. Tài liệu cũng giới thiệu chi tiết về các khóa học Khoa học Máy tính khác nhau và các khái niệm kỹ thuật như Weighted Quick Union và HashMaps.
- 目录
- Agenda
- Announcements
- Design!
- Weighted Quick Union with Path Compression
- HashMaps
- Course Overview (Personal experiences)
- Course Overviews (16x)
- Course Overviews (16x) cont.
- Course Overview (17x)
- Course Overview (18x)
- Course Overview (other)
- 页数
- 18 页
- 上传者
- Uni24h
评论 (0)
暂无评论。快来抢沙发吧!
Misc.onclusion (Discussion 14-END) (Ôn tập cấu trúc dữ liệu) - Christine Zhou
Final Review Solutions (Cấu trúc dữ liệu heap, hàng đợi ưu tiên và duyệt đồ thị) - Ching and Christines
Giáo trình Lập trình Java
Inheritance (Discussion 4) (Kế thừa trong Java) - Christine Zhou
Asymptotic Analysis (Discussion 7) (Phân tích tiệm cận) - Christine Zhou
Chương 7.Cơ học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 6.Quang học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 5.Thuyết tương đối - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 4. Tán xạ ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 3.Phân cực ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
评论 (0)
暂无评论。快来抢沙发吧!