MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / func5

Function func5

CPP/pandigital_numbers/code.cpp:30–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30vector<int> func5(string str, vector<int> &values)
31{
32 int num = stoi(str);
33 int a, b;
34 b = num % 10;
35 num /= 10;
36 a = num % 10;
37 num /= 10;
38
39 vector<int> vec;
40
41 for (int i = 0; i < values.size(); i++)
42 {
43 if (values[i] == 0 && (i == 0 || i == 5))
44 {
45 vec.push_back(i);
46 }
47 }
48
49 return vec;
50}
51
52vector<int> func7(string str, vector<int> &values)
53{

Callers 1

funcFunction · 0.85

Calls 2

push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected