I\'m trying to get some practice with sorting in Java.
I\'m working on the merge sort now... Eclipse is outputting Out Of Memory Error: Java Heap space,
while (left.size() > 0 || right.size() > 0) {
doesn't exit because you don't remove any items from your left or right, so you keep adding items to sortedList until it runs out of memory. You check if either of them is greater than 0 but you never remove any items so the check will never return false, aka infinite loop.