Skip to content

Commit 5cad50c

Browse files
committed
fixes.
1 parent 7ecd3db commit 5cad50c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

strings/duval.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @file duval.cpp
2+
* @file duval.cpp
33
* @brief Implementation of [Duval's algorithm](https://en.wikipedia.org/wiki/Lyndon_word).
44
*
55
* @details
@@ -101,6 +101,10 @@ static void test() {
101101
std::string s3;
102102
assert(duval(s3) == 0);
103103

104+
// Test 7
105+
std::vector<int> v2 = {5, 2, 1, 3, -4};
106+
assert(duval(v2) == 4);
107+
104108
std::cout << "All tests passed!" << std::endl;
105109
}
106110

0 commit comments

Comments
 (0)