How to store a graph in PASCAL

Правка en3, от IloveGoodness, 2021-07-21 21:30:11

In C++, Graphs with large number of nodes (N > 3000) can be stored using vectors

vector<int> adjanced_nodes[N];
if (an edge exists between u and w)
{
  adjacent_nodes[u].push_back(w);
  adjacent_nodes[w].push_back(u);
} 

Pascal language doesn't have vectors, Can anyone please tell how we can store graphs in Pascal?

UPD: thanks Rifat83 for the solution

Теги free pascal, pascal

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский IloveGoodness 2021-07-21 21:30:11 58 Tiny change: 'in Pascal?' -> 'in Pascal?\n\nUPD: thanks [user:Rifat83] for the solution'
en2 Английский IloveGoodness 2021-07-21 16:51:00 5 Tiny change: 'be stored only using vec' -> 'be stored using vec'
en1 Английский IloveGoodness 2021-07-21 16:50:31 382 Initial revision (published)