3 ms·
"the material (of the book) focuses so much on Java," This isn't really true. There is one section of the book (section 2 in Chapter 1 iirc) that details the m
by plinkplonk 13y ago
"the material (of the book) focuses so much on Java,"
This isn't really true. There is one section of the book (section 2 in Chapter 1 iirc) that details the minimalistic subset of java used, and there are a total of four interfaces used in the book (Comparable, Comparator, Iterable, Iterator) and each is explained very clearly. The code uses no inheritance, no fancy types, no design patterns. Input and Output are abstracted away by author provided classes with the minimal methods required to read in and write out strings, ints etc (vs struggling with BufferedOutputStreams or whatever in mainstream java).
In other words, Java is used as a very minimalistic pseudocode. (e.g http://algs4.cs.princeton.edu/11model/Shuffle.java.html http://algs4.cs.princeton.edu/11model/Shuffle.java.html). It is almost python like.
A simple imperative language is best to learn the basics of algorithms in. You can't appreciate functional datastructures before you thoroughly understand imperative ones..
Something like SML may have been better, but the minimal 'loops + classes-as-structs-and-no-java-heavy-machinery' approach in the book works fine. There are certainly valid criticisms of the book to be made, but an 'excessive focus on Java' is not one of them imo (and I don't even like Java fwiw).
PS: Thank You for your book reccommendations. The "Metric Data Structures" book looks really interesting. Ordered.