题解 | #无缓存交换#
无缓存交换
https://www.nowcoder.com/practice/845ec89145b04b2b855d020d9c3ea2ef
import java.util.*; public class Exchange { public int[] exchangeAB(int[] AB) { // write code here int [] BA = new int[AB.length]; BA[0] = AB[1]; BA[1] = AB[0]; return BA; } }