Textbook: Algorithm, Programming Language: Java.