|
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!
|