I have a list of integer values, which can be from 1 to 4. So, let's say {1,2,4,1,3,2,1,4,4}, for example. Now I want to change the values as follows: All records with ...
- 1 should be converted to 4,
- 2 should be converted to 3,
- 3 should be converted to 2,
- 4 should be converted to 1.
There are many ways to do this, but I want to use the most efficient approach.
Any thoughts?
source
share