---
title: "Comment by Nam Nguyen on \"Rendering the Java heap as a Treemap\" | Hashnode"
description: "a dominator node D of a node A is a node that if removed would make A unreachable Should this be reversed? If you remove node D in the sample, node A is still r"
url: "https://hashnode.com/posts/rendering-the-java-heap-as-a-treemap/66f393828d003f4cd95af5ae/comment/66f3a653a8533947e2d47ef2"
---

[Discussion](https://hashnode.com/posts/rendering-the-java-heap-as-a-treemap/66f393828d003f4cd95af5ae)

Comment [Rendering the Java heap as a Treemap](https://hashnode.com/posts/rendering-the-java-heap-as-a-treemap/66f393828d003f4cd95af5ae)

[Nam Nguyen](https://hashnode.com/@eneim)

[Sep 25, 2024](https://hashnode.com/posts/rendering-the-java-heap-as-a-treemap/66f393828d003f4cd95af5ae/comment/66f3a653a8533947e2d47ef2)

> a dominator node D of a node A is a node that if removed would make A unreachable

Should this be reversed? If you remove node D in the sample, node A is still reachable by the Root node.

Edit: or perhaps you didn't mean the `A` and `D` in the example are the same as `A` and `D` in this definition.

[Pierre-Yves Ricau](https://hashnode.com/@py)

[Sep 26, 2024](https://hashnode.com/posts/rendering-the-java-heap-as-a-treemap/66f393828d003f4cd95af5ae/comment/66f3a653a8533947e2d47ef2#reply-66f4bf0832bd29e5e1b16e2f)

I wrote the example later without re reading the definition I gave.. that was confusing! Fixed it, thanks!
