81 std::string s1 =
"abcab";
82 assert(duval(s1) == 3);
85 std::string s2 =
"011100";
86 assert(duval(s2) == 4);
89 std::vector<int> v = {5, 2, 1, 3, 4};
90 assert(duval(v) == 2);
93 std::array<int, 5> a = {1, 2, 3, 4, 5};
94 assert(duval(a) == 0);
97 std::deque<char> d = {
'a',
'z',
'c',
'a',
'b'};
98 assert(duval(d) == 3);
102 assert(duval(s3) == 0);
105 std::vector<int> v2 = {5, 2, 1, 3, -4};
106 assert(duval(v2) == 4);
108 std::cout <<
"All tests passed!" << std::endl;