Easy to understand C++ code || sorting
```\nclass Solution {\npublic:\n    long long smallestNumber(long long num) {\n        string s=to_string(num);//convert no to string\n        if(num>0)\n      
```\nclass Solution {\npublic:\n    long long smallestNumber(long long num) {\n        string s=to_string(num);//convert no to string\n        if(num>0)\n        {\n            sort(s.begin(),s.end());//if its greater than 0 sort it\n        }\n        else\n        {\n            sort(s.begin(),s.end(),greater<char>());//if negetive no sort it in decending order\n        }\n        if(num>0)\n        {\n            int ind=s.find_first_not_of(\'0\');//find the first occurance of 0 and swap it with first non 0 element\n            swap(s[0],s[ind]);\n        }\n        long long ans=stoll(s);//convert string to num\n        if(num<0)\n            ans*=-1;//for neg no multiply by -1\n        return ans;\n    }\n};
['C', 'Sorting']