We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a1d191 commit c292e4fCopy full SHA for c292e4f
src/day9.cpp
@@ -59,18 +59,6 @@ std::string to_string(const Point &p) {
59
return s;
60
}
61
62
-void step(Point &H, Point &T, std::string_view instruction,
63
- std::set<std::string> &visited) {
64
- char direction = instruction[0];
65
- for (int step_size =
66
- std::atoi(instruction.substr(1, instruction.size() - 1).data());
67
- step_size > 0; --step_size) {
68
- H.step(direction);
69
- T.follow(H);
70
- visited.emplace(to_string(T));
71
- }
72
-}
73
-
74
template <size_t n>
75
void step(std::array<Point, n> &points, std::string_view instruction,
76
std::set<std::string> &visited) {
0 commit comments