File tree Expand file tree Collapse file tree 1 file changed +60
-2
lines changed Expand file tree Collapse file tree 1 file changed +60
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## [ Transpose] ( http://en.wikipedia.org/wiki/Transpose ) then Reverse
1
2
2
- ## TODO
3
- * write down thinking
3
+ You must know this method, or it is difficult.
4
4
5
+ ```
6
+ +---+---+
7
+ | 1 | 2 |
8
+ +---+---+
9
+ | 3 | 4 |
10
+ +---+---+
11
+ ```
12
+
13
+ Transpose: reflect the matrix over the main diagonal.
14
+
15
+
16
+ ```
17
+ Before
18
+
19
+ +
20
+ +---+---+
21
+ | + | 2 |
22
+ +---+---+
23
+ | 3 | + |
24
+ +---+---+
25
+ +
26
+
27
+ After
28
+
29
+ +
30
+ +---+---+
31
+ | 1 | 3 |
32
+ +---+---+
33
+ | 2 | 4 |
34
+ +---+---+
35
+ +
36
+ ```
37
+
38
+ Reverse: exchange each number along the vertical line in the middle
39
+
40
+ ```
41
+ Before
42
+
43
+ |
44
+ +---+---+
45
+ | 1 | 3 |
46
+ +---+---+
47
+ | 2 | 4 |
48
+ +---+---+
49
+ |
50
+
51
+
52
+ After
53
+
54
+ |
55
+ +---+---+
56
+ | 3 | 1 |
57
+ +---+---+
58
+ | 4 | 2 |
59
+ +---+---+
60
+ |
61
+
62
+ ```
You can’t perform that action at this time.
0 commit comments