Introduction to classical algorithms