It stores it as a collection of edges? Why not use adjacency list representation?
You iterate through all of the edges every time to find a nodes neighbors?
idk, this code just looks terrible to me.
You iterate through all of the edges every time to find a nodes neighbors?
idk, this code just looks terrible to me.
I’ve been in too many projects where devs almost never write tests. They cut corners by neither writing tests nor documentation because of time pressure. Then the code breaks in production with simple edge cases like NullPointerException and they need to fix it, so they don’t have time to write unit tests for the next feature. And it’s definitely harder to write tests after you implemented something.