Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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: