Skip to content

Commit 0c9c2eb

Browse files
Create CMP_TRIPLETS.cpp
1 parent 9cc9a19 commit 0c9c2eb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Math/CMP_TRIPLETS.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
vector<int> compareTriplets(vector<int> a, vector<int> b)
2+
{
3+
vector<int> output = {0, 0};
4+
5+
for (int i = 0; i < 3; i++)
6+
{
7+
if (a[i] != b[i])
8+
{
9+
output[int(a[i] < b[i])]++;
10+
}
11+
}
12+
13+
return output;
14+
}

0 commit comments

Comments
 (0)