超級幼稚的一道題,結果硬是糾結了好久:
題目鏈接:點擊打開鏈接
代碼:
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