Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
- Seiten
- 18
- Định dạng
- PPTX
- Dung lượng
- 326 KB
- Trường
- University of California, Berkeley
- Aufrufe
- 0
- Kommentare
- 0
- Lượt tải
- 0
Vorschau wird generiert...
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.
- Dokumentenname
- Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
- Schule / Kurs
- University of California, Berkeley · Lập trình Java
- Inhalt
- 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.
- Inhaltsverzeichnis
- 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)
- Seiten
- 18 Seiten
- Hochgeladen von
- Uni24h
Beschreibung
Trích nội dung tài liệu
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,
Häufig gestellte Fragen
Ist dieses Dokument kostenlos?
Ja. „Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou“ ist kostenlos — melden Sie sich einfach an und klicken Sie auf Herunterladen, um die Originaldatei zu erhalten.
Wie viele Seiten hat dieses Dokument?
Das Dokument hat 18 Seiten, für den Kurs Lập trình Java. Sie können es vor dem Herunterladen online in der Vorschau ansehen.
Kann ich vor dem Herunterladen eine Vorschau ansehen?
Ja. Sie können sich dieses Dokument direkt auf dieser Seite im Online-Reader ansehen und dann entscheiden, ob Sie es herunterladen möchten.
Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
Vorschau wird generiert...
Trích nội dung tài liệu
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,
- Dokumentenname
- Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
- Schule / Kurs
- University of California, Berkeley · Lập trình Java
- Inhalt
- 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.
- Inhaltsverzeichnis
- 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)
- Seiten
- 18 Seiten
- Hochgeladen von
- Uni24h
Kommentare (0)
Noch keine Kommentare. Seien Sie der Erste!
Java DataBase Connectivity - Kết nối kho dữ liệu Java
Ôn tập lập trình Java (MT2 Review Solutions) - Ching and Christines
Asymptotics II, Search Trees (Discussion 7) (Kỹ thuật phân tích thời gian chạy, cây tìm kiếm nhị phân) - Christine Zhou
Introduction to Java (Discussion 1) (Giới thiệu về Java) - Christine Zhou
Giáo trình Lập trình Java
Tổng hợp Đề Toán 5 - Luyện thi vào Lớp 6 - CLB EMath
Bài giảng vật lý đại cương (Chương 3) - Đỗ Ngọc Uấn
Chương 8.Nguyên tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
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

Kommentare (0)
Noch keine Kommentare. Seien Sie der Erste!