aboutsummaryrefslogtreecommitdiff
path: root/toeplitz_matrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toeplitz_matrix.cpp')
-rw-r--r--toeplitz_matrix.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/toeplitz_matrix.cpp b/toeplitz_matrix.cpp
index 8a1bec4..f451196 100644
--- a/toeplitz_matrix.cpp
+++ b/toeplitz_matrix.cpp
@@ -2,7 +2,7 @@
class Solution {
public:
- bool isToeplitzMatrix(vvd(int) & matrix) {
+ bool isToeplitzMatrix(vvd & matrix) {
int m = matrix.size(), n = matrix[0].size();
for (int i = 1; i < m; i++)
for (int j = 1; j < n; j++)
@@ -15,9 +15,9 @@ public:
int main() {
Solution obj;
// true - all diagonals have the same elements
- vvd(int) matrix = {{1, 2, 3, 4}, {5, 1, 2, 3}, {9, 5, 1, 2}};
+ vvd matrix = {{1, 2, 3, 4}, {5, 1, 2, 3}, {9, 5, 1, 2}};
// false - diagonals do not share same elements
- vvd(int) matrix2 = {{1, 2}, {2, 2}};
+ vvd matrix2 = {{1, 2}, {2, 2}};
if (obj.isToeplitzMatrix(matrix))
cout << "true";