@abreen/tada 1.15.6 → 1.15.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,12 +25,10 @@ Selection sort is a well-known comparison-based sorting algorithm.
25
25
 
26
26
  Selection sort's strength is its simplicity.
27
27
 
28
+ - The helper method, `index_smallest()` is easy to understand
28
29
  - `index_smallest()` always scans from `start` to the end
29
30
  - It requires no additional memory (other than local variables)
30
31
 
31
- However, it has no `break` statements and therefore can't return early if
32
- the array is already sorted.
33
-
34
32
  ---
35
33
 
36
34
  ## Performance
@@ -51,12 +49,16 @@ The innermost statement compares `nums[i]` and `nums[curr]`.
51
49
  - when `i` is $n - 3$, the comparison is executed two times
52
50
  - when `i` is $n - 2$, the comparison is executed one time
53
51
 
54
- Therefore the total number of comparisons is
52
+ Therefore the total number of comparisons $C(n)$ is
55
53
 
56
54
  $$
57
- (n-1) + (n-2) + \dots + 1 = \sum_{i=1}^{n-1}i
55
+ (n-1) + (n-2) + \dots + 1 = \sum_{i=1}^{n-1}i = \frac{n(n-1)}{2}
58
56
  $$
59
57
 
58
+ ??? question What complexity class does $C(n)$ belong to?
59
+ It's a quadratic function. The class is $O(n^2)$.
60
+ ???
61
+
60
62
  ---
61
63
 
62
64
  ## Review
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abreen/tada",
3
- "version": "1.15.6",
3
+ "version": "1.15.8",
4
4
  "type": "module",
5
5
  "description": "A static site generator",
6
6
  "license": "MIT",
@@ -112,6 +112,10 @@
112
112
  }
113
113
  }
114
114
 
115
+ .js body.is-presenting .question-a-body::after {
116
+ display: none;
117
+ }
118
+
115
119
  .js .question-a-body[data-revealed] {
116
120
  cursor: unset;
117
121
 
@@ -2,7 +2,7 @@
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: var(--gap);
5
- height: calc(100dvh - var(--header-collapsed-height) - 3 * var(--gap));
5
+ height: calc(100svh - var(--header-collapsed-height) - 3 * var(--gap));
6
6
  overflow: hidden;
7
7
  }
8
8