Skip to content

Commit 853a2cb

Browse files
authored
Update largest-multiple-of-three.cpp
1 parent e3ff408 commit 853a2cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

C++/largest-multiple-of-three.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ class Solution {
66
string largestMultipleOfThree(vector<int>& digits) {
77
static const unordered_map<int, vector<vector<int>>> lookup = {
88
{0, {}},
9-
{1, {{1}, {4}, {7}, {2, 2}, {2, 5}, {5, 5}, {2, 8}, {5, 8}, {8, 8}}},
10-
{2, {{2}, {5}, {8}, {1, 1}, {1, 4}, {4, 4}, {1, 7}, {4, 7}, {7, 7}}}
9+
{1, {{1}, {4}, {7}, {2, 2}, {5, 2}, {5, 5}, {8, 2}, {8, 5}, {8, 8}}},
10+
{2, {{2}, {5}, {8}, {1, 1}, {4, 1}, {4, 4}, {7, 1}, {7, 4}, {7, 7}}}
1111
};
1212
unordered_map<int, int> count = counter(digits);
1313
const auto& r = accumulate(cbegin(digits), cend(digits), 0) % 3;

0 commit comments

Comments
 (0)