From e009604a9e0d17a30841bdf3c70ec0fa11940060 Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Sat, 3 Feb 2024 10:29:19 -0700 Subject: [PATCH] Basic notes on sorting. --- .../plugins/obsidian-to-anki-plugin/data.json | 4 +-- notes/algorithms/sorting/index.md | 32 ++++++++++++++++++- notes/journal/2024-02-03.md | 8 +++-- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json index 3002959..98eac95 100644 --- a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json +++ b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json @@ -75,11 +75,11 @@ "nix/index.md": "dd5ddd19e95d9bdbe020c68974d77a33", "journal/2024-02-02.md": "a3b222daee8a50bce4cbac699efc7180", "bash/prompts.md": "61cb877e68da040a15b85af76b1f68ba", - "algorithms/sorting/index.md": "cd189e1a2cf32b5656b16aaf9f488874", + "algorithms/sorting/index.md": "3dea2ae728a19fa2d877711fa319ed87", "algorithms/sorting/insertion-sort.md": "c78c9983f87cdc4198f82803d418967f", "algorithms/index.md": "1583c07edea4736db27c38fe2b6c4c31", "c/escape-sequences.md": "07f0811b0fff14f54f78abc33f2e6606", - "journal/2024-02-03.md": "fca2323a3284ca8cd0a1aea9e354bb80", + "journal/2024-02-03.md": "0c5632b15b5f981bc3efe66c498f8add", "lua/index.md": "d41d8cd98f00b204e9800998ecf8427e", "c/index.md": "d41d8cd98f00b204e9800998ecf8427e", "gawk/variables.md": "4482c297e7f4f5987f42f1926a880ca7", diff --git a/notes/algorithms/sorting/index.md b/notes/algorithms/sorting/index.md index 51d8b6c..cf52005 100644 --- a/notes/algorithms/sorting/index.md +++ b/notes/algorithms/sorting/index.md @@ -9,7 +9,36 @@ tags: ## Overview -Let $n \geq 0$ and $S = \langle a_1, a_2, \ldots, a_n \rangle$ be a sequence. The **sorting problem** refers to permuting **keys** $a_1, a_2, \ldots, a_n$ into a new sequence $\langle a_1', a_2', \ldots, a_n' \rangle$ such that $a_1' \leq a_2' \leq \cdots \leq a_n'$. +Let $n \geq 0$. The **sorting problem** refers to permuting **records** $a_1, a_2, \ldots, a_n$ into a new sequence $\langle a_1', a_2', \ldots, a_n' \rangle$ such that $key(a_1') \leq key(a_2') \leq \cdots \leq key(a_n')$. + +%%ANKI +Cloze +In the sorting problem, a "{record}" refers to {the entries being sorted}. +Reference: Thomas H. Cormen et al., _Introduction to Algorithms_, 3rd ed (Cambridge, Mass: MIT Press, 2009). + +END%% + +%%ANKI +Cloze +In the sorting problem, a "{key}" refers to {the value records are sorted by}. +Reference: Thomas H. Cormen et al., _Introduction to Algorithms_, 3rd ed (Cambridge, Mass: MIT Press, 2009). + +END%% + +%%ANKI +Cloze +In the sorting problem, "{satellite data}" refers to {the non-key values of records}. +Reference: Thomas H. Cormen et al., _Introduction to Algorithms_, 3rd ed (Cambridge, Mass: MIT Press, 2009). + +END%% + +%%ANKI +Basic +What term does Cormen et al. use to describe the record value used for sorting? +Back: Keys. +Reference: Thomas H. Cormen et al., _Introduction to Algorithms_, 3rd ed (Cambridge, Mass: MIT Press, 2009). + +END%% %%ANKI Basic @@ -26,6 +55,7 @@ Back: One in which only a constant number of input values are ever stored outsid Reference: Thomas H. Cormen et al., _Introduction to Algorithms_, 3rd ed (Cambridge, Mass: MIT Press, 2009). END%% + ## Structural Comparison The #Elixir documentation makes a point that there exist two types of comparisons between data types.[^structural] The first is **structural** in which comparisons are made on the underlying data structures used to describe the data types. The second is **semantic** which focuses on making the comparison with respect to what the data types represent. diff --git a/notes/journal/2024-02-03.md b/notes/journal/2024-02-03.md index f31b42f..878c1e4 100644 --- a/notes/journal/2024-02-03.md +++ b/notes/journal/2024-02-03.md @@ -4,10 +4,12 @@ title: "2024-02-03" - [x] Anki Flashcards - [x] KoL -- [ ] Sheet Music (10 min.) +- [x] Sheet Music (10 min.) - [ ] OGS (1 Life & Death Problem) -- [ ] Korean (Read 1 Story) +- [x] Korean (Read 1 Story) - [ ] Interview Prep (1 Practice Problem) - [ ] Log Work Hours (Max 3 hours) -* Spent time consolidating how different escape sequences behave across languages (`awk`, Bash, C, and Lua). \ No newline at end of file +* Spent time consolidating how different escape sequences behave across languages (`awk`, Bash, C, and Lua). +* Read 호랑이와 곶감 (The Tiger and the Dried Persimmon). +* Started practicing "One Summer's Day" by Joe Hisaishi, arranged by Torbjørn Brandrud. \ No newline at end of file