Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
Génération de l'aperçu...
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.
Description
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,
Résumé IA
- Nom du document
- Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
- École / Cours
- University of California, Berkeley · Lập trình Java
- Contenu
- 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.
- Table des matières
- 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)
- Pages
- 18 pages
- Téléversé par
- Uni24h
Foire aux questions
Ce document est-il gratuit ?
Oui. « Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou » est gratuit — il suffit de vous connecter et de cliquer sur Télécharger pour obtenir le fichier original.
Combien de pages compte ce document ?
Le document contient 18 pages, pour le cours Lập trình Java. Vous pouvez le prévisualiser en ligne avant de le télécharger.
Puis-je prévisualiser avant de télécharger ?
Oui. Vous pouvez prévisualiser ce document directement sur cette page avec le lecteur en ligne, puis décider de le télécharger ou non.
Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
Génération de l'aperç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,
Lire le document entier
- Nom du document
- Weighted Quick Union và HashMaps (Discussion 14) - Christine Zhou
- École / Cours
- University of California, Berkeley · Lập trình Java
- Contenu
- 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.
- Table des matières
- 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)
- Pages
- 18 pages
- Téléversé par
- Uni24h
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !
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
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !