Our original goal for this book was to cover the 50 algorithms that every programmer should know. We use the word programmer to refer to anyone engaged in trying to accomplish something with the help of a computer, including scientists, engineers, and applications developers, not to mention college students in science, engineering, and computer science. The code is optimized for clarity, portability, and efficiency. While some of our implementations are as fast as their counterparts in java.util, our primary goal is to express the core algorithmic idea in an elegant and efficient manner. While we embrace some advanced Java features (such as generics and iterators), we avoid others that would interfere with the exposition (such as inheritance and concurrency).
我们本书的最初目标是涵盖每个程序员都应该知道的50种算法。我们用“程序员”这个词来指任何试图在计算机帮助下完成某事的人,包括科学家、工程师和应用程序开发人员,更不用说理工科和计算机科学专业的大学生了。该代码为清晰性、可移植性和效率进行了优化。虽然我们的一些实现与java中的对应实现一样快。我们的主要目标是以优雅高效的方式表达核心算法思想。虽然我们接受了一些高级Java特性(如泛型和迭代器),但我们避免了其他会干扰展示的特性(如继承和并发)。