Skip to content

Commit 9a1a71b

Browse files
dierbeiyanglbme
authored andcommitted
chore: format code with clang-format
1 parent 225e022 commit 9a1a71b

File tree

1 file changed

+3
-3
lines changed
  • solution/1500-1599/1570.Dot Product of Two Sparse Vectors

1 file changed

+3
-3
lines changed

solution/1500-1599/1570.Dot Product of Two Sparse Vectors/Solution.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
class SparseVector {
22
public:
33
unordered_map<int, int> d;
4-
5-
SparseVector(vector<int> &nums) {
4+
5+
SparseVector(vector<int>& nums) {
66
for (int i = 0; i < nums.size(); ++i) {
77
if (nums[i]) {
88
d[i] = nums[i];
99
}
1010
}
1111
}
12-
12+
1313
// Return the dotProduct of two sparse vectors
1414
int dotProduct(SparseVector& vec) {
1515
auto a = d;

0 commit comments

Comments
 (0)