diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml index 26ea1089..6ac0b425 100644 --- a/.github/workflows/markdown-lint.yml +++ b/.github/workflows/markdown-lint.yml @@ -24,7 +24,8 @@ jobs: with: node-version: 24.x - name: Install dependencies - run: npm install -g markdownlint-cli + run: > + npm install -g --ignore-scripts markdownlint-cli@0.47.0 - name: Lint run: > diff --git a/Dockerfile b/Dockerfile index 39ba0cc5..d49e3d9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,8 @@ WORKDIR ${WORKDIR} RUN apk add --update --no-cache make nodejs npm \ && apk add --update --no-cache yamllint \ - && npm install -g --ignore-scripts markdownlint-cli \ - && npm install -g --ignore-scripts markdownlint-cli prettier + && npm install -g --ignore-scripts markdownlint-cli@0.47.0 \ + && npm install -g --ignore-scripts prettier@3.7.4 # [!TIP] Use a bind-mount to "/app" to override following "copys" # for lint and test against "current" sources in this stage diff --git a/docs/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/ctci-ransom-note.md b/docs/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/ctci-ransom-note.md index 5ddf475d..690076ea 100644 --- a/docs/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/ctci-ransom-note.md +++ b/docs/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/ctci-ransom-note.md @@ -49,7 +49,8 @@ The third line contains `n` space-separated strings, each `node[i]`. - $ 1 \leq m, n \leq 30000 $ - $ 1 \leq $ length of `magazine[i]` and `note[i]` $ \leq 5 $ -- Each word consists of English alphabetic letters (i.e., `a` to `z` and `A` to `Z`). +- Each word consists of English alphabetic letters (i.e., `a` to `z` and `A` + to `Z`). ## Sample Input 0 diff --git a/docs/hackerrank/interview_preparation_kit/graphs/roads_and_libraries-solution-notes.md b/docs/hackerrank/interview_preparation_kit/graphs/roads_and_libraries-solution-notes.md index 0416b5e8..8ce1aa42 100644 --- a/docs/hackerrank/interview_preparation_kit/graphs/roads_and_libraries-solution-notes.md +++ b/docs/hackerrank/interview_preparation_kit/graphs/roads_and_libraries-solution-notes.md @@ -16,7 +16,8 @@ implemented in C++ that are a little more difficult to understand. Even so, in the solution found in the article (*), it will not work directly by copying and pasting the code since the author (apparently on purpose) wrote -wrong the calculation formula by exchanging the cost variables of libraries and paths. +wrong the calculation formula by exchanging the cost variables of libraries and +paths. ## Solution sources diff --git a/docs/hackerrank/interview_preparation_kit/greedy_algorithms/angry-children.md b/docs/hackerrank/interview_preparation_kit/greedy_algorithms/angry-children.md index 1177d8ea..a9d8abd4 100644 --- a/docs/hackerrank/interview_preparation_kit/greedy_algorithms/angry-children.md +++ b/docs/hackerrank/interview_preparation_kit/greedy_algorithms/angry-children.md @@ -140,4 +140,5 @@ max(1,2,3,4) - min(1,2,3,4) = 4 - 1 = 3 ## Explanation 2 -Here `k = 2`. `arr' = [2, 2]` or `arr' = [1, 1]` give the minimum unfairness of `0`. +Here `k = 2`. `arr' = [2, 2]` or `arr' = [1, 1]` give the minimum unfairness +of `0`. diff --git a/docs/hackerrank/interview_preparation_kit/greedy_algorithms/greedy-florist.md b/docs/hackerrank/interview_preparation_kit/greedy_algorithms/greedy-florist.md index c5d6e780..54965a09 100644 --- a/docs/hackerrank/interview_preparation_kit/greedy_algorithms/greedy-florist.md +++ b/docs/hackerrank/interview_preparation_kit/greedy_algorithms/greedy-florist.md @@ -74,7 +74,8 @@ the original price of each flower. ## Explanation 0 -There are `n = 3` flowers with costs `c = [2, 5, ,6]` and `k = 3` people in the group. +There are `n = 3` flowers with costs `c = [2, 5, ,6]` and `k = 3` people in the +group. If each person buys one flower, the total cost of prices paid is `2 + 5 + 6 = 13` dollars. Thus, we print `13` as our answer. diff --git a/docs/hackerrank/interview_preparation_kit/linked_lists/insert-a-node-into-a-sorted-doubly-linked-list.md b/docs/hackerrank/interview_preparation_kit/linked_lists/insert-a-node-into-a-sorted-doubly-linked-list.md index 11a4f454..22f04195 100644 --- a/docs/hackerrank/interview_preparation_kit/linked_lists/insert-a-node-into-a-sorted-doubly-linked-list.md +++ b/docs/hackerrank/interview_preparation_kit/linked_lists/insert-a-node-into-a-sorted-doubly-linked-list.md @@ -21,10 +21,11 @@ Complete the sortedInsert function in the editor below. sortedInsert has two parameters: -- DoublyLinkedListNode pointer head: a reference to the head of a doubly-linked list +- DoublyLinkedListNode pointer head: a reference to the head of a doubly-linked + list - int data: An integer denoting the value of the `data` field for the -DoublyLinkedListNode you must insert into the list. + DoublyLinkedListNode you must insert into the list. ## Returns diff --git a/docs/hackerrank/interview_preparation_kit/trees/binary-search-tree-lowest-common-ancestor.md b/docs/hackerrank/interview_preparation_kit/trees/binary-search-tree-lowest-common-ancestor.md index af158578..43b88019 100644 --- a/docs/hackerrank/interview_preparation_kit/trees/binary-search-tree-lowest-common-ancestor.md +++ b/docs/hackerrank/interview_preparation_kit/trees/binary-search-tree-lowest-common-ancestor.md @@ -35,7 +35,8 @@ Node `3` is the lowest node which has nodes and as descendants. ## Function Description Complete the function lca in the editor below. -It should return a pointer to the lowest common ancestor node of the two values given. +It should return a pointer to the lowest common ancestor node of the two values +given. lca has the following parameters: diff --git a/docs/hackerrank/projecteuler/euler002.md b/docs/hackerrank/projecteuler/euler002.md index 27c7fb0c..a8983546 100644 --- a/docs/hackerrank/projecteuler/euler002.md +++ b/docs/hackerrank/projecteuler/euler002.md @@ -3,7 +3,8 @@ - Difficulty: #easy - Category: #ProjectEuler+ -Each new term in the Fibonacci sequence is generated by adding the previous two terms. +Each new term in the Fibonacci sequence is generated by adding the previous two +terms. By starting with $ 1 $ and $ 2 $, the first $ 10 $ terms will be: $$ 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 $$ diff --git a/docs/hackerrank/projecteuler/euler003-solution-notes.md b/docs/hackerrank/projecteuler/euler003-solution-notes.md index 24828ec1..ca48bda1 100644 --- a/docs/hackerrank/projecteuler/euler003-solution-notes.md +++ b/docs/hackerrank/projecteuler/euler003-solution-notes.md @@ -33,7 +33,8 @@ The first solution, using the algorithm taught in school, is: > Using some test entries, quickly broke the solution at all. So, don't use it. > This note is just to record the failed idea. -Since by going through and proving the divisibility of a number $ i $ up to $ n $ +Since by going through and proving the divisibility of a number $ i $ up to +$ n $ there are also "remainder" numbers that are also divisible by their opposite, let's call it $ j $. diff --git a/docs/projecteuler/problem0002.md b/docs/projecteuler/problem0002.md index 34abbf22..4ba89bf2 100644 --- a/docs/projecteuler/problem0002.md +++ b/docs/projecteuler/problem0002.md @@ -1,6 +1,7 @@ # [Even Fibonacci numbers](https://projecteuler.net/problem=2) -Each new term in the Fibonacci sequence is generated by adding the previous two terms. +Each new term in the Fibonacci sequence is generated by adding the previous +two terms. By starting with 1 and 2, the first 10 terms will be: $ 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... $ diff --git a/docs/projecteuler/problem0020.md b/docs/projecteuler/problem0020.md index 5c1e2003..1eff679c 100644 --- a/docs/projecteuler/problem0020.md +++ b/docs/projecteuler/problem0020.md @@ -3,6 +3,7 @@ $ n! $ means $ n × (n − 1) × ... × 3 × 2 × 1 $ For example, $ 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800 $, -and the sum of the digits in the number $ 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27 $. +and the sum of the digits in the number $ 10! $ is +$ 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27 $. Find the sum of the digits in the number $ 100! $