☝Easy & Simple c++ solution👌
\nclass Solution {\npublic:\n    long long smallestNumber(long long num) {\n        bool check = (num > 0) ? 0 : 1;\n        string temp = to_string(abs(num));\
```\nclass Solution {\npublic:\n    long long smallestNumber(long long num) {\n        bool check = (num > 0) ? 0 : 1;\n        string temp = to_string(abs(num));\n        if(!check) {\n            sort(temp.begin(), temp.end());\n            for(long long i = 0; i < temp.size(); i++) {\n                if(temp[i] != \'0\') {\n                    swap(temp[0], temp[i]);\n                    break;\n                }\n            }\n        }\n        else {\n            sort(temp.begin(), temp.end(), greater<char>());\n        }\n        return (check == 0) ? stol(temp) : (-1 * stol(temp));\n    }\n};\n```
['C', 'Sorting']