2 ms·
Then, count could be a static method, and you wouldn’t need to construct the DominoTilingCounter, yielding std::cout << DominoTilingCounter.count(4, 7) << '\
by Someone 6y ago
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)