types of algorithms in computer programming