Various Algrithm codes