From 6f3a936cda8cb7ec03da98d078d5c34b430429f2 Mon Sep 17 00:00:00 2001
From: Haidong Ji
Date: Mon, 17 Dec 2018 08:43:36 -0600
Subject: Closest Pair done in C++!
Finally Divide and Conquer section is finished. A lot of work but so
much fun!
A few take aways:
1. Be careful when copying code over from Java to C++. Java does
parameter passing through reference as default, but I forgot to add "&"
in C++ code, which caused my code not passing earlier;
2. Avoid unnecessary calculation. For example, the sqrt calculation is
not necessary, until the last step. Avoiding that in my Python code
saved a lot of time.
3. It seems that preallocate vector size, if you know beforehand, is a
good idea.
Woohoo, onto the next section!---
PlaygroundCpp/.settings/language.settings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'PlaygroundCpp/.settings')
diff --git a/PlaygroundCpp/.settings/language.settings.xml b/PlaygroundCpp/.settings/language.settings.xml
index aa6e0c9..1410d72 100644
--- a/PlaygroundCpp/.settings/language.settings.xml
+++ b/PlaygroundCpp/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
--
cgit v1.2.3