Algorithm, Design pattern