Implementation of programs from Jon Bentley's book