As any books, this book has some typos but it's a not big problem. The biggest problem I found at this time, it's in mergesort algorithm implementation. The authors forgot to check if the list is empty so it doesn't need to sort. This causes an IndexOutOfBoundsException while try to mergesort sublists.
No problem, I'm continuing to read it. Just for fun! :-)
But keep it in your mind (if you want to read this book), add the following code fragment at the begginning of mergesort(List list, int start, int end) method
if (end < start) {
return list;
}
No comments:
Post a Comment