Sam Warner 6 лет назад
Родитель
Сommit
ef22075a07
3 измененных файлов: 27 добавлений и 22 удалений
  1. 1
    1
      exercises/armstrong-numbers/README.md
  2. 3
    2
      exercises/bracket-push/README.md
  3. 23
    19
      exercises/crypto-square/README.md

+ 1
- 1
exercises/armstrong-numbers/README.md Просмотреть файл

5
 For example:
5
 For example:
6
 
6
 
7
 - 9 is an Armstrong number, because `9 = 9^1 = 9`
7
 - 9 is an Armstrong number, because `9 = 9^1 = 9`
8
-- 10 is *not* an Armstrong number, because `10 != 1^2 + 0^2 = 2`
8
+- 10 is *not* an Armstrong number, because `10 != 1^2 + 0^2 = 1`
9
 - 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153`
9
 - 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153`
10
 - 154 is *not* an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`
10
 - 154 is *not* an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`
11
 
11
 

+ 3
- 2
exercises/bracket-push/README.md Просмотреть файл

1
 # Bracket Push
1
 # Bracket Push
2
 
2
 
3
-Given a string containing brackets `[]`, braces `{}` and parentheses `()`,
4
-verify that all the pairs are matched and nested correctly.
3
+Given a string containing brackets `[]`, braces `{}`, parentheses `()`,
4
+or any combination thereof, verify that any and all pairs are matched
5
+and nested correctly.
5
 
6
 
6
 # Java Tips
7
 # Java Tips
7
 
8
 

+ 23
- 19
exercises/crypto-square/README.md Просмотреть файл

12
 
12
 
13
 For example, the sentence
13
 For example, the sentence
14
 
14
 
15
-> If man was meant to stay on the ground, god would have given us roots.
15
+```text
16
+"If man was meant to stay on the ground, god would have given us roots."
17
+```
16
 
18
 
17
 is normalized to:
19
 is normalized to:
18
 
20
 
19
-> ifmanwasmeanttostayonthegroundgodwouldhavegivenusroots
21
+```text
22
+"ifmanwasmeanttostayonthegroundgodwouldhavegivenusroots"
23
+```
20
 
24
 
21
 The plaintext should be organized in to a rectangle.  The size of the
25
 The plaintext should be organized in to a rectangle.  The size of the
22
 rectangle (`r x c`) should be decided by the length of the message,
26
 rectangle (`r x c`) should be decided by the length of the message,
27
 `c = 8` and `r = 7`:
31
 `c = 8` and `r = 7`:
28
 
32
 
29
 ```text
33
 ```text
30
-ifmanwas
31
-meanttos
32
-tayonthe
33
-groundgo
34
-dwouldha
35
-vegivenu
36
-sroots
34
+"ifmanwas"
35
+"meanttos"
36
+"tayonthe"
37
+"groundgo"
38
+"dwouldha"
39
+"vegivenu"
40
+"sroots  "
37
 ```
41
 ```
38
 
42
 
39
 The coded message is obtained by reading down the columns going left to
43
 The coded message is obtained by reading down the columns going left to
42
 The message above is coded as:
46
 The message above is coded as:
43
 
47
 
44
 ```text
48
 ```text
45
-imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau
49
+"imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau"
46
 ```
50
 ```
47
 
51
 
48
 Output the encoded text in chunks that fill perfect rectangles `(r X c)`,
52
 Output the encoded text in chunks that fill perfect rectangles `(r X c)`,
51
 chunks with a single trailing space.
55
 chunks with a single trailing space.
52
 
56
 
53
 ```text
57
 ```text
54
-imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn  sseoau 
58
+"imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn  sseoau "
55
 ```
59
 ```
56
 
60
 
57
 Notice that were we to stack these, we could visually decode the
61
 Notice that were we to stack these, we could visually decode the
58
 cyphertext back in to the original message:
62
 cyphertext back in to the original message:
59
 
63
 
60
 ```text
64
 ```text
61
-imtgdvs
62
-fearwer
63
-mayoogo
64
-anouuio
65
-ntnnlvt
66
-wttddes
67
-aohghn
68
-sseoau
65
+"imtgdvs"
66
+"fearwer"
67
+"mayoogo"
68
+"anouuio"
69
+"ntnnlvt"
70
+"wttddes"
71
+"aohghn "
72
+"sseoau "
69
 ```
73
 ```
70
 
74
 
71
 # Running the tests
75
 # Running the tests