mihainan

Tema SD - Andrei

May 17th, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. typedef struct _node{
  2.     int nr;
  3.     float dist;
  4.     struct _node* next;
  5. }*Node;
  6.  
  7. typedef struct _list{
  8.     int nr_varf;
  9.     Node l_adiacenta;
  10.     struct _list* next;
  11. }*List;
  12.  
  13. typedef struct _graph{
  14.     int nr_varfuri;
  15.     List lista;
  16. }*Graph;
  17.  
  18. //Varianta a 2-a cu vector de liste :P
  19. typedef struct _node{
  20.     int nr;
  21.     float dist;
  22.     struct _node* next;
  23. }*Node;
  24.  
  25. typedef struct _graph{
  26.     int nr_varfuri;
  27.     Node* lista; //aloci dinamic memoria pentru vector in initGraph
  28. }*Graph;
Advertisement
Add Comment
Please, Sign In to add comment