Publicis Sapient interview question

Coding the Manhattan and Euclidean distances between two n dimensional points