Not a puzzle exactly.
Q. Are you familiar with curly bracket matching in vi editor?
(FYI: you may use % to find matching curly brackets)
implement this feature in 'your own' editor.
[you may even give a single-WORD-answer :-]
To simplify the question...
imagine a text with curly brackets like the following
"{{}{{}{}}{}}"
Input/output:
2nd curly matches with 3rd
1st curly with last one
4th with 9th
Now start writing the program.
Q. we have identified a problem in our hardware memory.
|<--------------32-bit---------->|
+--------------------------------+
| A |
+--------------------------------+
| B |
+--------------------------------+
| C |
+--------------------------------+
| D |
+--------------------------------+
| E |
+--------------------------------+
| F |
+--------------------------------+
Whenever we give instruction to write something to A it writes to B. and vice versa.
it occurs in a similar pattern for rest of the memory. like C to D, D to C, E to F, F to E, and so on.
write a workaround(in a single line).