Comparing bubble sort with Java's Collections.sort