Algorithm For Finding Closest Pair Problem