超级幼稚的一道题,结果硬是纠结了好久:
题目链接:点击打开链接
代码:
python:
class Solution:
"""
@param A: An integer array
@param index1: the first index
@param index2: the second index
@return: nothing
"""
def swapIntegers(self, A, index1, index2):
# write your code here
a=A[index1]
A[index1]=A[index2]
A[index2]=a