Representing data structure in memory is an interesting concept that perhaps a handful of developers haven't come across yet. Those who have done competitive programming have come across it.
The three popular ways to represent graphs in memory are:
...