[LeetCode] Bulls and Cows

  • 时间:
  • 浏览:5

This problem seems to be easy at the first glance, especially the problem gives a too much simpler example. Make sure you understand the problem by making more examples or refering to some other material, like the Wikipedia article.

Stefan shares a very simple and elegant solution, which is rewritten below using multiset in C++.