summaryrefslogtreecommitdiff
path: root/not-quite-lisp/README.org
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2024-06-09 22:02:45 -0600
committerbd <bdunahu@operationnull.com>2024-06-09 22:02:45 -0600
commite61508e4764d69a4ea0073f419b89ff0a06e813e (patch)
treeb2f49eeced70c552c73e4030c87406f47a0a8f5e /not-quite-lisp/README.org
parentaec326408dd6ad16347b5661112895e60335893a (diff)
AoC 2015.1 p1+2
Diffstat (limited to 'not-quite-lisp/README.org')
-rw-r--r--not-quite-lisp/README.org20
1 files changed, 20 insertions, 0 deletions
diff --git a/not-quite-lisp/README.org b/not-quite-lisp/README.org
new file mode 100644
index 0000000..d701543
--- /dev/null
+++ b/not-quite-lisp/README.org
@@ -0,0 +1,20 @@
+See: https://adventofcode.com/2015/day/1
+** Part 1
+*** Purpose
+Given a stream of parenthesis:
+
+#+begin_example
+))(((((
+#+end_example
+
+We subtract the number of "((" parens from the number of ")))".
+
+*** Method
+The solution to this is simple: count the number of each, and perform the subtraction. Given that I already solved part on of this problem before, I will instead immediately design a solution to the problem that also works for part 2. In my attempt months ago, I made the "mistake" of not using a loop :):
+
+** Part 2
+*** Purpose
+Now, we need to calculate the index of the input stream where the cumulative number is first zero.
+
+*** Method
+The above information reveals that a solution that would work for both parts is a simple loop structure.