algorithms programs in different languages