Common used algorithms about search and sort