types of algorithms in computer science