Pātuhitia tēnei: Introduction to the design & analysis of algorithms