emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[HW#3] #195

Closed liamsgordon closed 3 years ago

liamsgordon commented 3 years ago

When I use my getMinimumSpanningTrees method for any individual graph in MSTAllHWTest, it will return all of the spanning trees. When I run this in the MSTAllHWTest it returns a java.lang.OutOfMemoryError: Java heap space. Is this a concern that my code is not efficient enough in terms of space, or is it fine to submit?

lujiaying commented 3 years ago

That OutofMemoryError may purely indicate that the code runs successfully but only not able to have enough memory to return all results. Meanwhile, it is also possible that the code could not return successfully and keeps allocating new heaps. In case of the latter scenario, I may suggest trying to use a small testcase to ensure the script is correct.

lujiaying commented 3 years ago

You may refer to https://github.com/emory-courses/dsa-java/issues/193

liamsgordon commented 3 years ago

thank you, it works for every individual case in a main method, so I'm pretty sure it is the second case.