#include <leetcode.h>
◆ smallestNumber()
long long leetcode::smallest_value_of_the_rearranged_number::Solution::smallestNumber |
( |
long long |
num | ) |
|
|
static |
在文件 leetcode.cpp 第 2416 行定义.
2417 bool positive = num > 0;
2418 auto oss = ostringstream();
2422 for(
char ch: oss.str()) {
2423 n.push_back(ch -
'0');
2425 sort(n.begin(), n.end());
2435 ans.insert(ans.begin() + 1, i);
2439 for(
int i = n.size() - 1; i >= 0; i--) {
2440 ans.push_back(n[i]);
2443 oss = ostringstream();
2450 auto iss = istringstream(oss.str());
被这些函数引用 leetcode::smallest_value_of_the_rearranged_number::TEST().
该类的文档由以下文件生成: