| Rating | Count | Histogram | Notes |
|---|---|---|---|
| ★ | 32 | █ | Unbearable. |
| ★★ | 136 | ██████ | Drinkable. |
| ★★★ | 128 | ██████ | Beer. |
| ★★★★ | 190 | █████████ | Really enjoyable. (Or tastes like an IPA.) |
| ★★★★★ | 69 | ███ | Amazing! |
| Brewery-ish/Brand-ish | Beer | Rating |
|---|
| abc 1 2 3 | |
| def 4 5 6 | |
| ga 7 9 10 | |
| hij 1 5 99 |
| "Describe an algorithm that consumes five distinct comparable objects and | |
| produces the median of these objects using a total of at most six comparisons." | |
| Because creative thinking is hard, we use a simpler approach and try to compute | |
| a suitable program recursively. Programs are represented by a tree of | |
| comparisons at the internal nodes and resulting indices at the leaves. | |
| The following code has been tested with Python 2.6.8, 2.7.3, and 3.3.0. |
| Rating | Count | Histogram | Notes |
|---|---|---|---|
| ★ | 32 | █ | Unbearable. |
| ★★ | 136 | ██████ | Drinkable. |
| ★★★ | 128 | ██████ | Beer. |
| ★★★★ | 190 | █████████ | Really enjoyable. (Or tastes like an IPA.) |
| ★★★★★ | 69 | ███ | Amazing! |
| Brewery-ish/Brand-ish | Beer | Rating |
|---|
| /* gcc -o cube cube.c | |
| * QWASDE, Esc | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/select.h> | |
| #include <termios.h> | |
| #include <unistd.h> |