Skip to content

Instantly share code, notes, and snippets.

@nickforce
Created December 2, 2023 05:45
Show Gist options
  • Save nickforce/651aaf1e54b4cfd4990aa711831b4612 to your computer and use it in GitHub Desktop.
Save nickforce/651aaf1e54b4cfd4990aa711831b4612 to your computer and use it in GitHub Desktop.
Advent
public with sharing class Advent {
@AuraEnabled
public static Integer readPuzzleInput(String fileName, String fileContent) {
return read_lines(fileContent);
}
public static Integer read_lines(String puzzleInput) {
// Split by newline chars
List<String> lines = puzzleInput.split('\n');
// call puzzle solution
return day01.part1(lines);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment