📅  最后修改于: 2022-03-11 14:45:49.354000             🧑  作者: Mango
// day 14 scope hackerrank solution in python
# Add your code here
def computeDifference(self):
maxDiff = 0
arr = self.__elements
for i in range(len(arr)):
for j in range(i+1, len(arr)):
if abs(arr[j] - arr[i]) > maxDiff:
maxDiff = abs(arr[j] - arr[i])
self.maximumDifference = maxDiff