Create minDistance.cpp

trivial implementation