C++ || Easy & Short Solution
\nclass Solution {\npublic:\n    int nthUglyNumber(int n) {\n        set<long> st;\n        st.insert(1);\n        long num = 1;\n        for(int i=0;i<n;i++){\
```\nclass Solution {\npublic:\n    int nthUglyNumber(int n) {\n        set<long> st;\n        st.insert(1);\n        long num = 1;\n        for(int i=0;i<n;i++){\n            num = *st.begin();\n            st.erase(num);\n            st.insert(num * 2);\n            st.insert(num * 3);\n            st.insert(num * 5);\n        }\n        return num;\n    }\n};\n```\nDo upvote if it helped :)
['C', 'Ordered Set', 'C++']