PillarManJ / AdvacnedAlgorithmsProject2

Project2
0 stars 0 forks source link

Code Review #3

Open GAstraeus opened 4 years ago

GAstraeus commented 4 years ago

https://github.com/PillarManJ/AdvacnedAlgorithmsProject2/blob/60ffeb773c0bdbd32fe769ae9a7f64b5b92c5905/Graphs.cpp#L50 The integer in this pairing is not necessary

GAstraeus commented 4 years ago

https://github.com/PillarManJ/AdvacnedAlgorithmsProject2/blob/60ffeb773c0bdbd32fe769ae9a7f64b5b92c5905/Graphs.cpp#L55 Make sure to check if that connection already exists the adjacency list

GAstraeus commented 4 years ago

https://github.com/PillarManJ/AdvacnedAlgorithmsProject2/blob/60ffeb773c0bdbd32fe769ae9a7f64b5b92c5905/Graphs.cpp#L15 https://github.com/PillarManJ/AdvacnedAlgorithmsProject2/blob/60ffeb773c0bdbd32fe769ae9a7f64b5b92c5905/Graphs.cpp#L22 Its confusing that both the nodes and the graph have an adjacency list attribute

GAstraeus commented 4 years ago

https://github.com/PillarManJ/AdvacnedAlgorithmsProject2/blob/60ffeb773c0bdbd32fe769ae9a7f64b5b92c5905/Graphs.cpp#L75 If you make your adjacency list a set from the beginning you can avoid this for loop for the return