[Solved] efficiency and inefficiency of recursion methods in java [closed]
It depends on the size of the objects you are recursing. If you are doing recursion over objects that are already in memory, memory impact will be neglible because it’s simply using the same objects that are already in memory over and over. Just see which objects/variables you can re-use to keep memory footprint low. … Read more