Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Consider calculating the Hamming distance inside the constructor and storing the result in a member variable which can be returned inside `getHammingDistance()`.
This solution seems to be calculating the Hamming distance inside the `getHammingDistance()` method.
This means that the calculation might be done again if you did not use lazy initialization.
This means that the calculation might be done again, unless the result is stored and retrieved (in which case you can ignore this recommendation).