Basic computer science algorithms