Skip to content

Commit e6d3d2d

Browse files
committed
Finished Day 2 (although seems to fail actual puzzle despite test cases)
1 parent 473ad97 commit e6d3d2d

File tree

11 files changed

+1233
-30
lines changed

11 files changed

+1233
-30
lines changed

include/advent_of_code/day_1.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include "spdlog/spdlog.h"
2525

26-
namespace AdventOfCode::Day1 {
26+
namespace AdventOfCode24::Day1 {
2727
typedef std::pair<std::vector<int>, std::vector<int>> file_data;
2828

2929
/**

include/advent_of_code/day_2.hxx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@
55
#include <string>
66
#include <filesystem>
77
#include <fstream>
8+
#include <optional>
9+
#include <sstream>
10+
#include <numeric>
11+
#include <vector>
12+
#include <algorithm>
13+
14+
#include "spdlog/spdlog.h"
815

916
namespace AdventOfCode24::Day2 {
1017
const int BUFFER_SIZE{1024};
11-
bool is_safe(std::istringstream& line);
12-
bool check_reactor_safety(const std::filesystem::path& input_file);
18+
bool safe_pair(int val_1, int val_2, int direction);
19+
int check_intervals(const std::vector<int>& numbers);
20+
bool report_is_safe(std::istringstream& line);
21+
std::vector<bool> check_reactor_safety(const std::filesystem::path& input_file, bool problem_dampening);
1322
};

0 commit comments

Comments
 (0)