Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Someone
on May 28, 2020
|
parent
|
context
|
favorite
| on:
The use of `class` for things that should be simpl...
Then,
count
could be a static method, and you wouldn’t need to construct the
DominoTilingCounter
, yielding
std::cout << DominoTilingCounter.count(4, 7) << '\n';
That’s close to a free function, using the class only for grouping (say of private helper functions, or for memoization data structures)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: