Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ toString
Function
toString
code/other/nth_permutation.test.cpp:1–9 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
string toString(vector<int> p) {
2
stringstream ss;
3
for (int i = 0; i < size(p); i++) {
4
if (i != 0) ss <<
","
;
5
ss << p[i];
6
}
7
8
return ss.str();
9
}
10
11
void test() {
12
assert_equal(string(
"0,1,2"
), toString(nth_permutation(3, 0)));
Callers
1
test
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected