LLRB's, Hashing, Heaps (Discussion 8) (Cây LLRB, bảng băm và heap) - Christine Zhou
- ページ数
- 89
- 形式
- PPTX
- サイズ
- 1.5 MB
- Trường
- University of California, Berkeley
- 閲覧数
- 0
- コメント
- 0
- Lượt tải
- 0
プレビューを生成中...
Tài liệu thảo luận về cây LLRB, bảng băm và heap, bao gồm các bài tập chuyển đổi cây 2-3 sang cây đỏ-đen và các thao tác chèn.
- ドキュメント名
- LLRB's, Hashing, Heaps (Discussion 8) (Cây LLRB, bảng băm và heap) - Christine Zhou
- 学校 / コース
- University of California, Berkeley · Lập trình Java
- 内容
- Tài liệu này trình bày về Cây tìm kiếm cân bằng LLRB, Hashing và Heaps, bao gồm các định nghĩa, cách thức hoạt động và bài tập minh họa. Nó tập trung vào việc xây dựng và duy trì cây LLRB thông qua các phép quay và đổi màu.
- 目次
- Administrivia
- Balanced Search Trees
- LLRB Tree
- Exercise 1.2
- Problem 1.1/1.2
- Exercise 1.1
- ページ数
- 89 ページ
- アップロード者
- Uni24h
説明
Trích nội dung tài liệu
Discussion 8: LLRB’s, Hashing, Heaps Christine Zhou Administrivia Project 2AB released. ○ ArrayHeapMinPQ due Saturday 3/16 ○ K-D Tree due Saturday 3/23 Lab 8 is out, due Friday 3/15! ○ Labs will likely be released Sundays now. ○ You implement a HashMap! Did you know Challenge Labs are a thing? Discussion survey: tinyurl.com/cz-disc8-sp19 Balanced Search Trees Bushy was better than spindly trees in terms of runtime 2-3 Trees! (also called 2-4 Trees) Should still follow the BST property (less on the left, greater on the right) Each node contains 1-2 elements with 2-3 children nodes If we want to insert an element, traverse down the tree and put it in the corresponding leaf node (we will always add to leaf nodes) It’s possible that it will have more than 2 elements After inserting, split the node by picking the middle element to send up. This can happen recursively Try inserting z into our 2-3 Tree! LLRB Tree Implemented like a BST, but use different colored links to represent 2-3 trees Black link: connects parent 2-3 tree node to child 2-3 tree node (same as regular tree) Red link: “glues” child to parent, child and parent are in the same 2-3 tree node Has one-to-one mapping with 2-3 tree, which means for every LLRB there is a corresponding 2-3 tree! Exercise 1.2 Convert the following tree into a RB tree Problem 1.1/1.2 Problem 1.1/1.2 Exercise 1.1 Draw what the following 2-3 tree left-leaning red black tree would look like after inserting 18, 38, 12, 13, and 20. Problem 1.1/1.2 + 18 What colored links should we use to add? Problem 1.1/1.2 +18 Problem 1.1/1.2 +18 Is this left leaning?
よくある質問
このドキュメントは無料ですか?
はい。「LLRB's, Hashing, Heaps (Discussion 8) (Cây LLRB, bảng băm và heap) - Christine Zhou」は無料です。ログインして「ダウンロード」をクリックするだけで、元のファイルを取得できます。
このドキュメントは何ページありますか?
このドキュメントは 89 ページあります(Lập trình Java コース用)。ダウンロードする前にオンラインでプレビューできます。
ダウンロードする前にプレビューできますか?
はい。このページにあるオンラインリーダーでドキュメントをプレビューし、その後ダウンロードするかどうかを決めることができます。
LLRB's, Hashing, Heaps (Discussion 8) (Cây LLRB, bảng băm và heap) - Christine Zhou
プレビューを生成中...
Trích nội dung tài liệu
Discussion 8: LLRB’s, Hashing, Heaps Christine Zhou Administrivia Project 2AB released. ○ ArrayHeapMinPQ due Saturday 3/16 ○ K-D Tree due Saturday 3/23 Lab 8 is out, due Friday 3/15! ○ Labs will likely be released Sundays now. ○ You implement a HashMap! Did you know Challenge Labs are a thing? Discussion survey: tinyurl.com/cz-disc8-sp19 Balanced Search Trees Bushy was better than spindly trees in terms of runtime 2-3 Trees! (also called 2-4 Trees) Should still follow the BST property (less on the left, greater on the right) Each node contains 1-2 elements with 2-3 children nodes If we want to insert an element, traverse down the tree and put it in the corresponding leaf node (we will always add to leaf nodes) It’s possible that it will have more than 2 elements After inserting, split the node by picking the middle element to send up. This can happen recursively Try inserting z into our 2-3 Tree! LLRB Tree Implemented like a BST, but use different colored links to represent 2-3 trees Black link: connects parent 2-3 tree node to child 2-3 tree node (same as regular tree) Red link: “glues” child to parent, child and parent are in the same 2-3 tree node Has one-to-one mapping with 2-3 tree, which means for every LLRB there is a corresponding 2-3 tree! Exercise 1.2 Convert the following tree into a RB tree Problem 1.1/1.2 Problem 1.1/1.2 Exercise 1.1 Draw what the following 2-3 tree left-leaning red black tree would look like after inserting 18, 38, 12, 13, and 20. Problem 1.1/1.2 + 18 What colored links should we use to add? Problem 1.1/1.2 +18 Problem 1.1/1.2 +18 Is this left leaning?
- ドキュメント名
- LLRB's, Hashing, Heaps (Discussion 8) (Cây LLRB, bảng băm và heap) - Christine Zhou
- 学校 / コース
- University of California, Berkeley · Lập trình Java
- 内容
- Tài liệu này trình bày về Cây tìm kiếm cân bằng LLRB, Hashing và Heaps, bao gồm các định nghĩa, cách thức hoạt động và bài tập minh họa. Nó tập trung vào việc xây dựng và duy trì cây LLRB thông qua các phép quay và đổi màu.
- 目次
- Administrivia
- Balanced Search Trees
- LLRB Tree
- Exercise 1.2
- Problem 1.1/1.2
- Exercise 1.1
- ページ数
- 89 ページ
- アップロード者
- Uni24h
コメント (0)
まだコメントはありません。最初のコメントを書きましょう!
Ô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
More Sorting (Discussion 13) (Thuật toán sắp xếp nâng cao) - 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

コメント (0)
まだコメントはありません。最初のコメントを書きましょう!