MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / rec

Function rec

code/data-structures/dancing_links.test.cpp:5–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3vi cur;
4
5void rec(dancing_links<int> &left) {
6 if (left.front == NULL) {
7 perms.push_back(vi(cur));
8 } else {
9 for (dancing_links<int>::node *it = left.front; it; it = it->r) {
10 cur.push_back(it->item);
11 left.erase(it);
12 rec(left);
13 left.restore(it);
14 cur.pop_back();
15 }
16 }
17}
18
19void test() {
20 int N = 8;

Callers 3

recMethod · 0.85
candidatesMethod · 0.85
testFunction · 0.85

Calls 3

push_backMethod · 0.80
restoreMethod · 0.80
eraseMethod · 0.45

Tested by

no test coverage detected