摘要:
Key: each of 2\3\5 is trying to multiply with the least number it has not been multiplied.class Solution {public: int nthUglyNumber(int n) { ... 阅读全文
摘要:
Another topological sorting problem. Note: the DFS one is like a 'post-order' traversal.class Solution { unordered_map> g; unordered_set visited... 阅读全文