As mentioned earlier, the implementation language used in this book is C++. The reader interested in a data structures book using Java, is encouraged to consider the companion text, Data Structures and Algorithms in Java. C++ and Java are clearly the most widely used languages in the modern computer science curriculum. The two languages share a similar syntax and a number of important elements, such as an emphasis on object-oriented program design and strong type checking. Hence, they both incorporate important software-engineering concepts.
These two languages have advantages and disadvantages relative to each other. Java is arguably the simpler and cleaner of the two languages. It has better automatic run-time error checking, it is platform-independent, it provides automatic garbage collection, and is generally friendlier to the programmer. C++ provides a number of desirable features that are not available in Java, however. It includes stronger compile-time type checking, through the use of the const type modifier, and namespaces to achieve better control of the visibility of shared data. It provides efficient compile-time type polymorphism through templates, and run-time polymorphism through abstract classes and virtual functions. It includes additional data types such as enumerations and pointers. It allows explicit control over the deallocation of free-store data and destruction of class objects. For low-level code efficiency, it permits the programmer to provide hints to the compiler through inline functions and register variables. In general, C++ provides much greater control for the programmer, but it places a much greater burden of responsibility as well.
C++ was designed with the philosophy of providing a complete set of features for a procedural, object-oriented programming language, while allowing the compiler to produce very efficient code with minimal run-time overhead. Given its emphasis on efficiency, C++ continues to be a popular language for developing modern software systems. This book will help provide an understanding of the wide spectrum of skills ranging from sound algorithm and data structure design to clean and efficient implementation and coding of these designs in C++.