Some basic algorithms and data structures based on "Algorithms Fourth Edition"