summaryrefslogtreecommitdiff
path: root/not-quite-lisp/README.org
diff options
context:
space:
mode:
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.