Как нарисовать визуализацию несвязанной структуры множества для следующего массива p[]? ⇐ JAVA
Как нарисовать визуализацию несвязанной структуры множества для следующего массива p[]?
Problem 1. Draw a visualization of the disjoint-set structure as we did in class for the following p[] array. i= [0 1 2 3 4 5 6 7 8 9], p= [2 2 2 3 4 4 4 7 3 7]
Problem 2. Suppose link(i, j) is the method as discussed in class that implements lazy linking with height (depth) control (i.e., point small into large). Draw a visualization after link(1,9) is called on the disjoint-sets data structure with the p[] array above. If you have heard of path compression, note that it does this without path compression.
I have tried something like this for problem 1 and problem 2:
enter image description here.
Is my diagram correct?
Источник: https://stackoverflow.com/questions/780 ... wing-p-arr
Problem 1. Draw a visualization of the disjoint-set structure as we did in class for the following p[] array. i= [0 1 2 3 4 5 6 7 8 9], p= [2 2 2 3 4 4 4 7 3 7]
Problem 2. Suppose link(i, j) is the method as discussed in class that implements lazy linking with height (depth) control (i.e., point small into large). Draw a visualization after link(1,9) is called on the disjoint-sets data structure with the p[] array above. If you have heard of path compression, note that it does this without path compression.
I have tried something like this for problem 1 and problem 2:
enter image description here.
Is my diagram correct?
Источник: https://stackoverflow.com/questions/780 ... wing-p-arr
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Заполнить 52-канальный массив имен карт из множества костюмов и множества рядов
Anonymous » » в форуме Php - 0 Ответы
- 29 Просмотры
-
Последнее сообщение Anonymous
-
-
-
NullPointerException при инициализации звука в Java для несвязанной переменной
Anonymous » » в форуме JAVA - 0 Ответы
- 18 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Создание общего связанного списка, размещение следующего указателя в начале структуры
Anonymous » » в форуме C++ - 0 Ответы
- 20 Просмотры
-
Последнее сообщение Anonymous
-