diff --git a/.gitignore b/.gitignore
index b2d6de3..aa8c739 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+
+# ignore generate zips
+static/files/**/*.zip
\ No newline at end of file
diff --git a/ib002/03-time-complexity/extend.md b/ib002/03-time-complexity/extend.md
index d348e46..6abbbab 100644
--- a/ib002/03-time-complexity/extend.md
+++ b/ib002/03-time-complexity/extend.md
@@ -1,8 +1,7 @@
---
title: Time complexity of ‹extend›
description: |
- Hidden time complexity behind commonly used functions on lists and how can
- repeating of a relatively cheap operation increase its time complexity.
+ How to make inefficient algorithm unknowingly.
---
## Introduction
@@ -80,39 +79,6 @@ Consider constructing of this list:
![Rendered construction of the list](/files/ib002/extend/construction.svg)
-
-Source for the rendered construction of the list
-
-```dot
-digraph G {
- node [shape=record];
-
- a_node [label="1|2|3|4|5|6|7|8|9"]
-
- b_node [label="1|2|3"]
- c_node [label="4|5|6"]
- d_node [label="7|8|9"]
-
- a_node -> b_node [label="B"]
- a_node -> c_node [label="C"]
- a_node -> d_node [label="D"]
-
- b_node -> "1"
- b_node -> "2"
- b_node -> "3"
-
- c_node -> "4"
- c_node -> "5"
- c_node -> "6"
-
- d_node -> "7"
- d_node -> "8"
- d_node -> "9"
-}
-```
-
-
-
Let us assume that you extend the result with the list that you get from the recursive call.
- B iterates through 1, 2 and 3; returns `[1, 2, 3]`
diff --git a/ib002/10-graphs/bfs-tree.md b/ib002/10-graphs/bfs-tree.md
index d9dc18d..77e9163 100644
--- a/ib002/10-graphs/bfs-tree.md
+++ b/ib002/10-graphs/bfs-tree.md
@@ -17,56 +17,10 @@ Consider the following graph:
![BFS graph](/files/ib002/bfs-tree/bfs_graph.svg)
-
-Source for the rendered graph
-
-```dot showLineNumbers
-graph {
- a -- c
- a -- e
-
- c -- i
- c -- b
-
- e -- j
-
- i -- d
-
- b -- h
-
- d -- h
-
- h -- j
-}
-```
-
-
-
We run BFS from the vertex $a$ and obtain the following BFS tree:
![BFS tree](/files/ib002/bfs-tree/bfs_tree.svg)
-
-Source for the BFS tree
-
-```dot showLineNumbers
-digraph {
- a -> c
- a -> e
-
- c -> b
- c -> i
-
- e -> j
-
- b -> h
-
- i -> d
-}
-```
-
-
-
Let's consider pair of vertices $e$ and $h$. For them we can safely lay, from the BFS tree, following properties:
- lower bound: $2$
@@ -82,32 +36,6 @@ Now the more important question, is there a shorter path in that graph? The answ
![BFS tree](/files/ib002/bfs-tree/bfs_graph_with_additional_edge.svg)
-
-Source for the BFS graph with an additional edge
-
-```dot showLineNumbers
-graph {
- a -- c
- a -- e
-
- c -- i
- c -- b
-
- e -- j
- e -- h
-
- i -- d
-
- b -- h
-
- d -- h
-
- h -- j
-}
-```
-
-
-
Okay, so we have a graph that breaks the rule we have laid. However, we need to run BFS to obtain the new BFS tree, since we have changed the graph.
:::tip
@@ -120,26 +48,6 @@ Do we need to run BFS after **every** change?
![BFS tree](/files/ib002/bfs-tree/bfs_tree_with_additional_edge.svg)
-
-Source for the BFS tree
-
-```dot showLineNumbers
-digraph {
- a -> c
- a -> e
-
- c -> b
- c -> i
-
- e -> h
- e -> j
-
- i -> d
-}
-```
-
-
-
Oops, we have gotten a new BFS tree, that has a height difference of 1.
:::tip
diff --git a/makefile b/makefile
index 52e93dc..3f5bd61 100644
--- a/makefile
+++ b/makefile
@@ -1,17 +1,20 @@
-dev:
- URL=http://localhost BASE_URL=/ npm run start
+dev: regenerate-dots regenerate-zips
+ URL=http://localhost BASE_URL=/ yarn run start
deploy-aisa:
- URL=https://fi.muni.cz BASE_URL=~xfocko/kb/ npm run build
+ URL=https://fi.muni.cz BASE_URL=~xfocko/kb/ yarn run build
rsync -avzrlpptv --delete build/ aisa:~/public_html/kb/
deploy-poincare:
- URL=https://fi.mfocko.xyz BASE_URL=/ npm run build
+ URL=https://fi.mfocko.xyz BASE_URL=/ yarn run build
rsync -avzrlpptv --delete build/ poincare:~/public_html/fi/
-deploy: deploy-aisa deploy-poincare
+deploy: regenerate-dots regenerate-zips deploy-aisa deploy-poincare
regenerate-dots:
bash regenerate-dots.sh
-.PHONY: deploy-aisa deploy-poincare regenerate-dots
+regenerate-zips:
+ bash regenerate-zips.sh
+
+.PHONY: deploy-aisa deploy-poincare regenerate-dots regenerate-zips
diff --git a/regenerate-zips.sh b/regenerate-zips.sh
new file mode 100644
index 0000000..13ac00f
--- /dev/null
+++ b/regenerate-zips.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# remove preexisting ZIPs
+find ./static/files -name '*.zip' -exec rm {} \;
+
+for relative_path in $(find ./static/files -name '.zipit' -print); do
+ relative_path=$(dirname $relative_path)
+ base=$(basename $relative_path)
+ pushd $relative_path/..
+
+ echo "PWD: $PWD"
+
+ all_files=$(find $base/** ! -name '.zipit' -print)
+ zip -9 $base.zip $all_files
+ mv $base.zip $base/$base.zip
+
+ popd
+done;
\ No newline at end of file
diff --git a/static/files/ib002/bfs-tree/bfs_graph.svg b/static/files/ib002/bfs-tree/bfs_graph.svg
deleted file mode 100644
index 2cb753b..0000000
--- a/static/files/ib002/bfs-tree/bfs_graph.svg
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
diff --git a/static/files/ib002/bfs-tree/bfs_graph_with_additional_edge.svg b/static/files/ib002/bfs-tree/bfs_graph_with_additional_edge.svg
deleted file mode 100644
index 0bcc7e8..0000000
--- a/static/files/ib002/bfs-tree/bfs_graph_with_additional_edge.svg
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
diff --git a/static/files/ib002/bfs-tree/bfs_tree.svg b/static/files/ib002/bfs-tree/bfs_tree.svg
deleted file mode 100644
index ee67d36..0000000
--- a/static/files/ib002/bfs-tree/bfs_tree.svg
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
-
diff --git a/static/files/ib002/bfs-tree/bfs_tree_with_additional_edge.svg b/static/files/ib002/bfs-tree/bfs_tree_with_additional_edge.svg
deleted file mode 100644
index 5988d13..0000000
--- a/static/files/ib002/bfs-tree/bfs_tree_with_additional_edge.svg
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
-
diff --git a/static/files/ib002/extend/.zipit b/static/files/ib002/extend/.zipit
new file mode 100644
index 0000000..e69de29
diff --git a/static/files/ib002/extend/construction.svg b/static/files/ib002/extend/construction.svg
deleted file mode 100644
index 043018d..0000000
--- a/static/files/ib002/extend/construction.svg
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-
-
-
diff --git a/static/files/ib002/iterative-and-iterators/.zipit b/static/files/ib002/iterative-and-iterators/.zipit
new file mode 100644
index 0000000..e69de29
diff --git a/static/files/pb071/bonuses/03/.zipit b/static/files/pb071/bonuses/03/.zipit
new file mode 100644
index 0000000..e69de29
diff --git a/static/files/pb071/bonuses/04/.zipit b/static/files/pb071/bonuses/04/.zipit
new file mode 100644
index 0000000..e69de29
diff --git a/static/files/pb071/bonuses/05-06/.zipit b/static/files/pb071/bonuses/05-06/.zipit
new file mode 100644
index 0000000..e69de29
diff --git a/static/files/pb071/bonuses/08/.zipit b/static/files/pb071/bonuses/08/.zipit
new file mode 100644
index 0000000..e69de29
diff --git a/static/files/pb071/bonuses/10/.zipit b/static/files/pb071/bonuses/10/.zipit
new file mode 100644
index 0000000..e69de29