this is brittle. Because what if someone runs this on a huge memory machine? Also, since a random graph is built, this might actually be fine in a run.

Since you are simply demoing the renumbering in this file, I will suggest choosing the max node id to be say 2^20 (1M), numNodes to be much less than that, generate graphs with and without renumbering and comparing some properties of the two graphs to demo the differences.