Skip to content

Commit

Permalink
fix typo in day 10
Browse files Browse the repository at this point in the history
  • Loading branch information
widdowquinn committed Dec 10, 2021
1 parent 0c6203f commit 74beff3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion day10.html
Expand Up @@ -14526,7 +14526,7 @@ <h1 id="Day-10:-Syntax-Scoring">Day 10: Syntax Scoring<a class="anchor-link" hre
If a chunk opens with &lt;, it must close with &gt;.

</code></pre>
<p>So, () is a legal chunk that contains no other chunks, as is <code>[]</code>. More complex but valid chunks include <code>([])</code>, <code>{()()()}</code>, <code>&lt;([{}])&gt;</code>, <code>[&lt;&gt;({}){}[([])&lt;&gt;]]</code>, and even <code>(((((((((())))))))))</code>.</p>
<p>So, <code>()</code> is a legal chunk that contains no other chunks, as is <code>[]</code>. More complex but valid chunks include <code>([])</code>, <code>{()()()}</code>, <code>&lt;([{}])&gt;</code>, <code>[&lt;&gt;({}){}[([])&lt;&gt;]]</code>, and even <code>(((((((((())))))))))</code>.</p>
<p>Some lines are incomplete, but others are corrupted. Find and discard the corrupted lines first.</p>
<p>A corrupted line is one where a chunk closes with the wrong character - that is, where the characters it opens and closes with do not form one of the four legal pairs listed above.</p>
<p>Examples of corrupted chunks include <code>(]</code>, <code>{()()()&gt;</code>, <code>(((()))}</code>, and <code>&lt;([]){()}[{}])</code>. Such a chunk can appear anywhere within a line, and its presence causes the whole line to be considered corrupted.</p>
Expand Down
36 changes: 18 additions & 18 deletions day10.ipynb
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "8b23e7b5",
"id": "4ca23171",
"metadata": {},
"source": [
"# Day 10: Syntax Scoring\n",
Expand All @@ -20,7 +20,7 @@
" If a chunk opens with {, it must close with }.\n",
" If a chunk opens with <, it must close with >.\n",
"\n",
"So, () is a legal chunk that contains no other chunks, as is `[]`. More complex but valid chunks include `([])`, `{()()()}`, `<([{}])>`, `[<>({}){}[([])<>]]`, and even `(((((((((())))))))))`.\n",
"So, `()` is a legal chunk that contains no other chunks, as is `[]`. More complex but valid chunks include `([])`, `{()()()}`, `<([{}])>`, `[<>({}){}[([])<>]]`, and even `(((((((((())))))))))`.\n",
"\n",
"Some lines are incomplete, but others are corrupted. Find and discard the corrupted lines first.\n",
"\n",
Expand Down Expand Up @@ -68,7 +68,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "9d2b798a",
"id": "85f7034e",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -86,7 +86,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "37d8e870",
"id": "149169ed",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -101,7 +101,7 @@
},
{
"cell_type": "markdown",
"id": "7053e6b9",
"id": "9d99b624",
"metadata": {},
"source": [
"To check for syntax errors, we use the shunting algorithm (or something similar to it, anyway).\n",
Expand All @@ -112,7 +112,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "e216f8ab",
"id": "d8dc3ef4",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -154,7 +154,7 @@
},
{
"cell_type": "markdown",
"id": "231bab76",
"id": "f0b13b4a",
"metadata": {},
"source": [
"With the test data:"
Expand All @@ -163,7 +163,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "ef4d975b",
"id": "5aa167a9",
"metadata": {},
"outputs": [
{
Expand All @@ -184,7 +184,7 @@
},
{
"cell_type": "markdown",
"id": "8617b348",
"id": "2d455f94",
"metadata": {},
"source": [
"And with the puzzle data:"
Expand All @@ -193,7 +193,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "336379f9",
"id": "91a4b753",
"metadata": {},
"outputs": [
{
Expand All @@ -214,7 +214,7 @@
},
{
"cell_type": "markdown",
"id": "99150483",
"id": "fdd55f7d",
"metadata": {},
"source": [
"## Puzzle 2:\n",
Expand Down Expand Up @@ -263,7 +263,7 @@
},
{
"cell_type": "markdown",
"id": "967c8ee5",
"id": "c84bfb97",
"metadata": {},
"source": [
"Finding incomplete lines is similar to finding syntax errors. We know the line is incomplete if, by the end of the input, we've found no errors, but there are still characters in the stack.\n",
Expand All @@ -274,7 +274,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "77eb5451",
"id": "1263059f",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -319,7 +319,7 @@
},
{
"cell_type": "markdown",
"id": "b2fc251a",
"id": "aecb65f6",
"metadata": {},
"source": [
"With the test data:"
Expand All @@ -328,7 +328,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "a1b49352",
"id": "c93c8005",
"metadata": {},
"outputs": [
{
Expand All @@ -349,7 +349,7 @@
},
{
"cell_type": "markdown",
"id": "a41f5ea3",
"id": "1be576cc",
"metadata": {},
"source": [
"With the input data:"
Expand All @@ -358,7 +358,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "f7a65c85",
"id": "c045f91c",
"metadata": {},
"outputs": [
{
Expand All @@ -380,7 +380,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "88199fd7",
"id": "cdf92835",
"metadata": {},
"outputs": [],
"source": []
Expand Down

0 comments on commit 74beff3

Please sign in to comment.